moodle-mod_customcert
moodle-mod_customcert copied to clipboard
When moving an element, snap to border instead of snap to original position
Steps to reproduce:
- Create a certificate instance and define a page width of 210 and a left and a right margin of 15 each
- Add an element to the certificate and give it a width of 180. Place it on a position with x = 15 with an arbitrary y position. The element will fit exactly into the usable page area.
- Open the repositioning editor
- Drag the element up or down the page
Actual behaviour:
- If you manage to release the element on a position with exactly x = 15 again, it will stay there.
- If you release the element on a position slightly left or right from x = 15, it will snap back to the original x and y position
- Note: The same happens for elements with a width less than 180, but it's easiest to reproduce with objects of that size.
Expected behaviour:
- If you manage to release the element on a position with exactly x = 15 again, it will stay there.
- If you release the element on a position slightly left or right from x = 15, it will stay at the y position where you released it, but will snap back to the nearest x position within the left and right margins
Thanks for the report.