Merge branch 'MDL-65908-37' of git://github.com/peterRd/moodle into MOODLE_37_STABLE
This commit is contained in:
+8
-15
@@ -1570,15 +1570,14 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
|
||||
*/
|
||||
draw: function() {
|
||||
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
|
||||
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
|
||||
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
|
||||
node,
|
||||
position;
|
||||
|
||||
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y));
|
||||
node = Y.Node.create('<div/>');
|
||||
// If these are absolutely positioned, they escape their scroll container.
|
||||
node.setStyles({
|
||||
'position': 'relative',
|
||||
'position': 'absolute',
|
||||
'display': 'inline-block',
|
||||
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')',
|
||||
'width': (this.endx - this.x),
|
||||
@@ -1587,7 +1586,7 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
|
||||
'zIndex': 50
|
||||
});
|
||||
|
||||
drawingregion.append(node);
|
||||
drawingcanvas.append(node);
|
||||
node.setX(position.x);
|
||||
node.setY(position.y);
|
||||
drawable.store_position(node, position.x, position.y);
|
||||
@@ -2544,7 +2543,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
||||
this.draw = function(focus) {
|
||||
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
|
||||
node,
|
||||
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
|
||||
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
|
||||
container,
|
||||
label,
|
||||
marker,
|
||||
@@ -2587,8 +2586,8 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
||||
color: COMMENTTEXTCOLOUR
|
||||
});
|
||||
|
||||
drawingregion.append(container);
|
||||
container.setStyle('position', 'relative');
|
||||
drawingcanvas.append(container);
|
||||
container.setStyle('position', 'absolute');
|
||||
container.setX(position.x);
|
||||
container.setY(position.y);
|
||||
drawable.store_position(container, position.x, position.y);
|
||||
@@ -3664,7 +3663,7 @@ EDITOR.prototype = {
|
||||
* @method open_in_panel
|
||||
*/
|
||||
open_in_panel: function(panel) {
|
||||
var drawingcanvas, drawingregion;
|
||||
var drawingcanvas;
|
||||
|
||||
this.panel = panel;
|
||||
panel.append(this.get('body'));
|
||||
@@ -3675,9 +3674,6 @@ EDITOR.prototype = {
|
||||
drawingcanvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
|
||||
this.graphic = new Y.Graphic({render: drawingcanvas});
|
||||
|
||||
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
|
||||
drawingregion.on('scroll', this.move_canvas, this);
|
||||
|
||||
if (!this.get('readonly')) {
|
||||
drawingcanvas.on('gesturemovestart', this.edit_start, null, this);
|
||||
drawingcanvas.on('gesturemove', this.edit_move, null, this);
|
||||
@@ -3694,7 +3690,7 @@ EDITOR.prototype = {
|
||||
* @method link_handler
|
||||
*/
|
||||
link_handler: function(e) {
|
||||
var drawingcanvas, drawingregion;
|
||||
var drawingcanvas;
|
||||
var resize = true;
|
||||
e.preventDefault();
|
||||
|
||||
@@ -3717,9 +3713,6 @@ EDITOR.prototype = {
|
||||
drawingcanvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
|
||||
this.graphic = new Y.Graphic({render: drawingcanvas});
|
||||
|
||||
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
|
||||
drawingregion.on('scroll', this.move_canvas, this);
|
||||
|
||||
if (!this.get('readonly')) {
|
||||
drawingcanvas.on('gesturemovestart', this.edit_start, null, this);
|
||||
drawingcanvas.on('gesturemove', this.edit_move, null, this);
|
||||
|
||||
+8
-8
File diff suppressed because one or more lines are too long
+8
-15
@@ -1570,15 +1570,14 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
|
||||
*/
|
||||
draw: function() {
|
||||
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
|
||||
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
|
||||
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
|
||||
node,
|
||||
position;
|
||||
|
||||
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y));
|
||||
node = Y.Node.create('<div/>');
|
||||
// If these are absolutely positioned, they escape their scroll container.
|
||||
node.setStyles({
|
||||
'position': 'relative',
|
||||
'position': 'absolute',
|
||||
'display': 'inline-block',
|
||||
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')',
|
||||
'width': (this.endx - this.x),
|
||||
@@ -1587,7 +1586,7 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
|
||||
'zIndex': 50
|
||||
});
|
||||
|
||||
drawingregion.append(node);
|
||||
drawingcanvas.append(node);
|
||||
node.setX(position.x);
|
||||
node.setY(position.y);
|
||||
drawable.store_position(node, position.x, position.y);
|
||||
@@ -2544,7 +2543,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
||||
this.draw = function(focus) {
|
||||
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
|
||||
node,
|
||||
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
|
||||
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
|
||||
container,
|
||||
label,
|
||||
marker,
|
||||
@@ -2587,8 +2586,8 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
||||
color: COMMENTTEXTCOLOUR
|
||||
});
|
||||
|
||||
drawingregion.append(container);
|
||||
container.setStyle('position', 'relative');
|
||||
drawingcanvas.append(container);
|
||||
container.setStyle('position', 'absolute');
|
||||
container.setX(position.x);
|
||||
container.setY(position.y);
|
||||
drawable.store_position(container, position.x, position.y);
|
||||
@@ -3664,7 +3663,7 @@ EDITOR.prototype = {
|
||||
* @method open_in_panel
|
||||
*/
|
||||
open_in_panel: function(panel) {
|
||||
var drawingcanvas, drawingregion;
|
||||
var drawingcanvas;
|
||||
|
||||
this.panel = panel;
|
||||
panel.append(this.get('body'));
|
||||
@@ -3675,9 +3674,6 @@ EDITOR.prototype = {
|
||||
drawingcanvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
|
||||
this.graphic = new Y.Graphic({render: drawingcanvas});
|
||||
|
||||
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
|
||||
drawingregion.on('scroll', this.move_canvas, this);
|
||||
|
||||
if (!this.get('readonly')) {
|
||||
drawingcanvas.on('gesturemovestart', this.edit_start, null, this);
|
||||
drawingcanvas.on('gesturemove', this.edit_move, null, this);
|
||||
@@ -3694,7 +3690,7 @@ EDITOR.prototype = {
|
||||
* @method link_handler
|
||||
*/
|
||||
link_handler: function(e) {
|
||||
var drawingcanvas, drawingregion;
|
||||
var drawingcanvas;
|
||||
var resize = true;
|
||||
e.preventDefault();
|
||||
|
||||
@@ -3717,9 +3713,6 @@ EDITOR.prototype = {
|
||||
drawingcanvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
|
||||
this.graphic = new Y.Graphic({render: drawingcanvas});
|
||||
|
||||
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
|
||||
drawingregion.on('scroll', this.move_canvas, this);
|
||||
|
||||
if (!this.get('readonly')) {
|
||||
drawingcanvas.on('gesturemovestart', this.edit_start, null, this);
|
||||
drawingcanvas.on('gesturemove', this.edit_move, null, this);
|
||||
|
||||
@@ -43,15 +43,14 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
|
||||
*/
|
||||
draw: function() {
|
||||
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
|
||||
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
|
||||
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
|
||||
node,
|
||||
position;
|
||||
|
||||
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y));
|
||||
node = Y.Node.create('<div/>');
|
||||
// If these are absolutely positioned, they escape their scroll container.
|
||||
node.setStyles({
|
||||
'position': 'relative',
|
||||
'position': 'absolute',
|
||||
'display': 'inline-block',
|
||||
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')',
|
||||
'width': (this.endx - this.x),
|
||||
@@ -60,7 +59,7 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
|
||||
'zIndex': 50
|
||||
});
|
||||
|
||||
drawingregion.append(node);
|
||||
drawingcanvas.append(node);
|
||||
node.setX(position.x);
|
||||
node.setY(position.y);
|
||||
drawable.store_position(node, position.x, position.y);
|
||||
|
||||
@@ -160,7 +160,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
||||
this.draw = function(focus) {
|
||||
var drawable = new M.assignfeedback_editpdf.drawable(this.editor),
|
||||
node,
|
||||
drawingregion = this.editor.get_dialogue_element(SELECTOR.DRAWINGREGION),
|
||||
drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
|
||||
container,
|
||||
label,
|
||||
marker,
|
||||
@@ -203,8 +203,8 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
||||
color: COMMENTTEXTCOLOUR
|
||||
});
|
||||
|
||||
drawingregion.append(container);
|
||||
container.setStyle('position', 'relative');
|
||||
drawingcanvas.append(container);
|
||||
container.setStyle('position', 'absolute');
|
||||
container.setX(position.x);
|
||||
container.setY(position.y);
|
||||
drawable.store_position(container, position.x, position.y);
|
||||
|
||||
+2
-8
@@ -367,7 +367,7 @@ EDITOR.prototype = {
|
||||
* @method open_in_panel
|
||||
*/
|
||||
open_in_panel: function(panel) {
|
||||
var drawingcanvas, drawingregion;
|
||||
var drawingcanvas;
|
||||
|
||||
this.panel = panel;
|
||||
panel.append(this.get('body'));
|
||||
@@ -378,9 +378,6 @@ EDITOR.prototype = {
|
||||
drawingcanvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
|
||||
this.graphic = new Y.Graphic({render: drawingcanvas});
|
||||
|
||||
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
|
||||
drawingregion.on('scroll', this.move_canvas, this);
|
||||
|
||||
if (!this.get('readonly')) {
|
||||
drawingcanvas.on('gesturemovestart', this.edit_start, null, this);
|
||||
drawingcanvas.on('gesturemove', this.edit_move, null, this);
|
||||
@@ -397,7 +394,7 @@ EDITOR.prototype = {
|
||||
* @method link_handler
|
||||
*/
|
||||
link_handler: function(e) {
|
||||
var drawingcanvas, drawingregion;
|
||||
var drawingcanvas;
|
||||
var resize = true;
|
||||
e.preventDefault();
|
||||
|
||||
@@ -420,9 +417,6 @@ EDITOR.prototype = {
|
||||
drawingcanvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
|
||||
this.graphic = new Y.Graphic({render: drawingcanvas});
|
||||
|
||||
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
|
||||
drawingregion.on('scroll', this.move_canvas, this);
|
||||
|
||||
if (!this.get('readonly')) {
|
||||
drawingcanvas.on('gesturemovestart', this.edit_start, null, this);
|
||||
drawingcanvas.on('gesturemove', this.edit_move, null, this);
|
||||
|
||||
Reference in New Issue
Block a user