Changeset 30460 for main


Ignore:
Timestamp:
2016-04-03T12:01:14+12:00 (8 years ago)
Author:
davidb
Message:

Adjustments to make resize and move posits working in new Greenstone3 environment

Location:
main/trunk/model-sites-dev/mozarts-laptop/collect/digital-music-stand/script
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/mozarts-laptop/collect/digital-music-stand/script/annotate-main.js

    r30456 r30460  
    2323    var containerPaddingX = parseInt(YAHOO.util.Dom.getStyle("thispage","padding-left"), 10);
    2424    var containerPaddingY = parseInt(YAHOO.util.Dom.getStyle("thispage","padding-top"), 10);
    25     var newWidth = clickX - containerX - containerPaddingX;
    26     var newHeight = clickY - containerY - containerPaddingY;
     25    //var newWidth = clickX - containerX - containerPaddingX;
     26    //var newHeight = clickY - containerY - containerPaddingY;
    2727
    2828
     
    3636       var ax_org = parseInt(annotateResizeElem.style.left);
    3737       var ay_org = parseInt(annotateResizeElem.style.top);
    38        var ax_dim = mouseX - ax_org +1;
    39        var ay_dim = mouseY - ay_org +1;
     38       //var ax_dim = mouseX - ax_org +1;
     39       //var ay_dim = mouseY - ay_org +1;
     40
     41       var ax_dim = (clickX - containerX - containerPaddingX) - ax_org +1;
     42       var ay_dim = (clickY - containerY - containerPaddingY) - ay_org +1;
    4043
    4144       if ((ax_dim>16) && (ay_dim>16)) {
     
    103106    annotateResizeElem = elem.parentNode.parentNode.parentNode.parentNode;
    104107
    105     console.log("*** clearing selection and setting cursor to null!");
     108    console.log("*** startRessizeAnnotation(): clearing selection and setting cursor to null!");
    106109    de.selection.clear(); // clear selection
    107110    de.cursor.setCursor(null); // clear focus
     
    143146    moveXOffset = mouseX - parseInt(annotateMoveElem.style.left);
    144147    moveYOffset = mouseY - parseInt(annotateMoveElem.style.top);
     148
     149    console.log("*** annotateMouseDown(): clearing selection and setting cursor to null!");
     150    de.selection.clear(); // clear selection
     151    de.cursor.setCursor(null); // clear focus
    145152
    146153    return false; // stop selection of page Image
     
    241248    var isAccelDown = de.events.Keyboard.isAcceleratorDown(e);
    242249    var isShiftDown = e.shiftKey;
    243     console.log("**** is accel down: " + isAccelDown);
    244     console.log("**** is shift down: " + isShiftDown);
     250    //console.log("**** is accel down: " + isAccelDown);
     251    //console.log("**** is shift down: " + isShiftDown);
    245252    //if (e.isAccelDown() || e.isShiftDown()) { return true; }
    246253    if (isAccelDown || isShiftDown) { return true; }
  • main/trunk/model-sites-dev/mozarts-laptop/collect/digital-music-stand/script/annotate.js

    r30456 r30460  
    120120      resizeElem.setAttribute("onmouseup",  "javascript:return stopResizeAnnotation(this,event);");
    121121
    122       resizeElem.setAttribute("style", "cursor:default;");
     122      resizeElem.setAttribute("style", "cursor:se-resize;");
    123123     
    124124      resizeElem.style.position = "absolute";
Note: See TracChangeset for help on using the changeset viewer.