MDL-55322 assignfeedback_editpdf: Prevent scroll when moving comments

Prevent the default scroll behaviour when using gestures to move
comments on the mobile site.
This commit is contained in:
Jake Dallimore
2016-08-01 09:48:20 +08:00
parent 2a9c12ce0b
commit 9e6ed38418
4 changed files with 7 additions and 4 deletions
@@ -2619,6 +2619,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
node.on('gesturemovestart', function(e) {
if (editor.currentedit.tool === 'select') {
e.preventDefault();
node.setData('dragging', true);
node.setData('offsetx', e.clientX - node.getX());
node.setData('offsety', e.clientY - node.getY());
File diff suppressed because one or more lines are too long
@@ -2619,6 +2619,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
node.on('gesturemovestart', function(e) {
if (editor.currentedit.tool === 'select') {
e.preventDefault();
node.setData('dragging', true);
node.setData('offsetx', e.clientX - node.getX());
node.setData('offsety', e.clientY - node.getY());
@@ -266,6 +266,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
node.on('gesturemovestart', function(e) {
if (editor.currentedit.tool === 'select') {
e.preventDefault();
node.setData('dragging', true);
node.setData('offsetx', e.clientX - node.getX());
node.setData('offsety', e.clientY - node.getY());