From 8c2bf1f0d74109e7e7ded1706821f4e6903084bd Mon Sep 17 00:00:00 2001 From: Jamie Pratt Date: Thu, 1 Sep 2011 17:19:24 +0700 Subject: [PATCH] MDL-47494 ddimageortext: NOBUG wait a little longer for page to settle down after images loaded. This seems to be necessary because after the tinymce editor loads xy coords all change. --- question/type/ddimageortext/yui/dd/dd.js | 2 +- question/type/ddimageortext/yui/form/form.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/question/type/ddimageortext/yui/dd/dd.js b/question/type/ddimageortext/yui/dd/dd.js index 32c199795ef..0d21ec45d81 100644 --- a/question/type/ddimageortext/yui/dd/dd.js +++ b/question/type/ddimageortext/yui/dd/dd.js @@ -38,7 +38,7 @@ YUI.add('moodle-qtype_ddimagetoimage-dd', function(Y) { } else if (this.polltimer === null) { var pollarguments = [null, waitforimageconstrain, pause, doafterwords]; this.polltimer = - Y.later(500, this, this.poll_for_image_load, pollarguments, true); + Y.later(1000, this, this.poll_for_image_load, pollarguments, true); } }, /** diff --git a/question/type/ddimageortext/yui/form/form.js b/question/type/ddimageortext/yui/form/form.js index 28b1ac814f1..039bd633622 100644 --- a/question/type/ddimageortext/yui/form/form.js +++ b/question/type/ddimageortext/yui/form/form.js @@ -40,9 +40,9 @@ YUI.add('moodle-qtype_ddimagetoimage-form', function(Y) { this.doc.drag_image_homes() .on('load', this.constrain_image_size, this, 'dragimage'); this.doc.bg_img().after('load', this.poll_for_image_load, this, - true, 1000, this.after_all_images_loaded); + true, 3000, this.after_all_images_loaded); this.doc.drag_image_homes() .after('load', this.poll_for_image_load, this, - true, 1000, this.after_all_images_loaded); + true, 3000, this.after_all_images_loaded); } else { this.setup_form_events(); }