@@ -1570,15 +1570,14 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
15701570 */
15711571 draw : function ( ) {
15721572 var drawable = new M . assignfeedback_editpdf . drawable ( this . editor ) ,
1573- drawingregion = this . editor . get_dialogue_element ( SELECTOR . DRAWINGREGION ) ,
1573+ drawingcanvas = this . editor . get_dialogue_element ( SELECTOR . DRAWINGCANVAS ) ,
15741574 node ,
15751575 position ;
15761576
15771577 position = this . editor . get_window_coordinates ( new M . assignfeedback_editpdf . point ( this . x , this . y ) ) ;
15781578 node = Y . Node . create ( '<div/>' ) ;
1579- // If these are absolutely positioned, they escape their scroll container.
15801579 node . setStyles ( {
1581- 'position' : 'relative ' ,
1580+ 'position' : 'absolute ' ,
15821581 'display' : 'inline-block' ,
15831582 'backgroundImage' : 'url(' + this . editor . get_stamp_image_url ( this . path ) + ')' ,
15841583 'width' : ( this . endx - this . x ) ,
@@ -1587,7 +1586,7 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
15871586 'zIndex' : 50
15881587 } ) ;
15891588
1590- drawingregion . append ( node ) ;
1589+ drawingcanvas . append ( node ) ;
15911590 node . setX ( position . x ) ;
15921591 node . setY ( position . y ) ;
15931592 drawable . store_position ( node , position . x , position . y ) ;
@@ -2544,7 +2543,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
25442543 this . draw = function ( focus ) {
25452544 var drawable = new M . assignfeedback_editpdf . drawable ( this . editor ) ,
25462545 node ,
2547- drawingregion = this . editor . get_dialogue_element ( SELECTOR . DRAWINGREGION ) ,
2546+ drawingcanvas = this . editor . get_dialogue_element ( SELECTOR . DRAWINGCANVAS ) ,
25482547 container ,
25492548 label ,
25502549 marker ,
@@ -2587,8 +2586,8 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
25872586 color : COMMENTTEXTCOLOUR
25882587 } ) ;
25892588
2590- drawingregion . append ( container ) ;
2591- container . setStyle ( 'position' , 'relative ' ) ;
2589+ drawingcanvas . append ( container ) ;
2590+ container . setStyle ( 'position' , 'absolute ' ) ;
25922591 container . setX ( position . x ) ;
25932592 container . setY ( position . y ) ;
25942593 drawable . store_position ( container , position . x , position . y ) ;
@@ -3664,7 +3663,7 @@ EDITOR.prototype = {
36643663 * @method open_in_panel
36653664 */
36663665 open_in_panel : function ( panel ) {
3667- var drawingcanvas , drawingregion ;
3666+ var drawingcanvas ;
36683667
36693668 this . panel = panel ;
36703669 panel . append ( this . get ( 'body' ) ) ;
@@ -3675,9 +3674,6 @@ EDITOR.prototype = {
36753674 drawingcanvas = this . get_dialogue_element ( SELECTOR . DRAWINGCANVAS ) ;
36763675 this . graphic = new Y . Graphic ( { render : drawingcanvas } ) ;
36773676
3678- drawingregion = this . get_dialogue_element ( SELECTOR . DRAWINGREGION ) ;
3679- drawingregion . on ( 'scroll' , this . move_canvas , this ) ;
3680-
36813677 if ( ! this . get ( 'readonly' ) ) {
36823678 drawingcanvas . on ( 'gesturemovestart' , this . edit_start , null , this ) ;
36833679 drawingcanvas . on ( 'gesturemove' , this . edit_move , null , this ) ;
@@ -3694,7 +3690,7 @@ EDITOR.prototype = {
36943690 * @method link_handler
36953691 */
36963692 link_handler : function ( e ) {
3697- var drawingcanvas , drawingregion ;
3693+ var drawingcanvas ;
36983694 var resize = true ;
36993695 e . preventDefault ( ) ;
37003696
@@ -3717,9 +3713,6 @@ EDITOR.prototype = {
37173713 drawingcanvas = this . get_dialogue_element ( SELECTOR . DRAWINGCANVAS ) ;
37183714 this . graphic = new Y . Graphic ( { render : drawingcanvas } ) ;
37193715
3720- drawingregion = this . get_dialogue_element ( SELECTOR . DRAWINGREGION ) ;
3721- drawingregion . on ( 'scroll' , this . move_canvas , this ) ;
3722-
37233716 if ( ! this . get ( 'readonly' ) ) {
37243717 drawingcanvas . on ( 'gesturemovestart' , this . edit_start , null , this ) ;
37253718 drawingcanvas . on ( 'gesturemove' , this . edit_move , null , this ) ;
0 commit comments