MDL-47494 ddmarker: Fix editing form javascript.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 21 May 2015 14:56:51 +0000 (15:56 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 21 May 2015 14:57:11 +0000 (15:57 +0100)
question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form-debug.js
question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form-min.js
question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form.js
question/type/ddmarker/yui/src/form/js/form.js

index 0700aa4..914c262 100644 (file)
Binary files a/question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form-debug.js and b/question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form-debug.js differ
index 39e27c6..4e443e2 100644 (file)
Binary files a/question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form-min.js and b/question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form-min.js differ
index 0700aa4..914c262 100644 (file)
Binary files a/question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form.js and b/question/type/ddmarker/yui/build/moodle-qtype_ddmarker-form/moodle-qtype_ddmarker-form.js differ
index 8d6923d..6e11b5f 100644 (file)
@@ -94,10 +94,12 @@ Y.extend(DDMARKER_FORM, M.qtype_ddmarker.dd_base_class, {
             this.draw_drop_zone(dropzoneno, markertext,
                     shape, coords, colourfordropzone, false);
         }
-        Y.one('div.ddarea .grid')
-            .setXY(this.doc.bg_img().getXY())
-            .setStyle('width', this.doc.bg_img().get('width'))
-            .setStyle('height', this.doc.bg_img().get('height'));
+        if (this.doc.bg_img()) {
+            Y.one('div.ddarea .grid')
+                    .setXY(this.doc.bg_img().getXY())
+                    .setStyle('width', this.doc.bg_img().get('width'))
+                    .setStyle('height', this.doc.bg_img().get('height'));
+        }
         M.util.js_complete(pendingid);
     },