MDL-51914 qtype_ddmarker: precise grading round the edges of zones
authorTim Hunt <T.J.Hunt@open.ac.uk>
Mon, 26 Oct 2015 17:40:26 +0000 (17:40 +0000)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Wed, 28 Oct 2015 10:53:00 +0000 (10:53 +0000)
commit2d391d1b10f9fc3a356278139375ae80b6c10dda
treece098364bce8a1b68691f8772ed2f209c6effbe6
parent9382ac38d60bee1226e3ba13906770552bea6012
MDL-51914 qtype_ddmarker: precise grading round the edges of zones

There was a previous change to the CSS (7px -> 3px) to make things
look prettier, which acutally broke the grading by a few pixes.
I fixed this by:

* Changing the offset of the cross hairs back to the correct value,
  and adding a comment to point out the imporance of not changing
  that CSS.

* Achieved the nice layout of the label relative to the cross-hairs
  in a different way.

* Added a similar clafirying comment in the JavaScript.

* Improved how the grid on the editing form is aligned with the
  background image.

* Added rounding to the grading code, to cope better now that
  browsers do sub-pixel positioning.
question/type/ddmarker/question.php
question/type/ddmarker/styles.css
question/type/ddmarker/yui/build/moodle-qtype_ddmarker-dd/moodle-qtype_ddmarker-dd-debug.js
question/type/ddmarker/yui/build/moodle-qtype_ddmarker-dd/moodle-qtype_ddmarker-dd.js
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/ddmarker/js/ddmarker.js
question/type/ddmarker/yui/src/form/js/form.js