Commit 7e4e11a6 authored by Andreas Gärtner's avatar Andreas Gärtner
Browse files

Fixed app crash when disabled question (mask) is tapped.

parent 01ca6ca1
...@@ -22,7 +22,7 @@ Ext.define('ARSnova.view.CustomMask', { ...@@ -22,7 +22,7 @@ Ext.define('ARSnova.view.CustomMask', {
config: { config: {
baseCls: Ext.baseCSSPrefix + 'mask', baseCls: Ext.baseCSSPrefix + 'mask',
cls: 'displayBlock', cls: 'displayInherit',
transparent: false, transparent: false,
top: 0, top: 0,
left: 0, left: 0,
...@@ -102,11 +102,17 @@ Ext.define('ARSnova.view.CustomMask', { ...@@ -102,11 +102,17 @@ Ext.define('ARSnova.view.CustomMask', {
var x = event.pageX, y = event.pageY; var x = event.pageX, y = event.pageY;
var containers = [], clicked = false; var containers = [], clicked = false;
var el = document.elementFromPoint(x, y); var el = document.elementFromPoint(x, y);
var timeoutTries = 30, counter = 0;
while (el && el.tagName !== "BODY" && el.tagName !== "HTML") { while (el && el.tagName !== "BODY" && el.tagName !== "HTML" && counter < timeoutTries) {
containers.push(el); containers.push(el);
el.style.display = "none"; el.style.display = "none";
if (el.className === 'videoImageContainer') {
break;
}
el = document.elementFromPoint(x, y); el = document.elementFromPoint(x, y);
counter++;
} }
for (var i = 0; i < containers.length; i++){ for (var i = 0; i < containers.length; i++){
......
...@@ -91,9 +91,7 @@ Ext.define('ARSnova.view.components.GridContainer', { ...@@ -91,9 +91,7 @@ Ext.define('ARSnova.view.components.GridContainer', {
canvas.id = 'canvasWrapper'; canvas.id = 'canvasWrapper';
canvas.width = this.getCanvasSize(); canvas.width = this.getCanvasSize();
canvas.height = this.getCanvasSize(); canvas.height = this.getCanvasSize();
canvas.style.display = 'block'; canvas.className = 'canvasConfiguration';
canvas.style.margin = '0 auto';
canvas.addEventListener("mouseup", this.onclick, false); canvas.addEventListener("mouseup", this.onclick, false);
canvas.parentContainer = this; canvas.parentContainer = this;
this.setCanvas(canvas); this.setCanvas(canvas);
......
...@@ -255,8 +255,13 @@ ...@@ -255,8 +255,13 @@
} }
} }
.displayBlock { .canvasConfiguration {
display: block !important; display: block;
margin: 0px auto;
}
.displayInherit {
display: inherit;
} }
.customMaskTextElement { .customMaskTextElement {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment