Changeset 33156 for main

Show
Ignore:
Timestamp:
15.06.2019 15:32:47 (4 months ago)
Author:
davidb
Message:

Backwards-compatible change made that allows for mousemove() to be called explicitly in to code (rather than in response to the user moving the mouse). Introduces a'robot-mouse-move()' capability, useful for example in the SVG map-zoomer feature used in the Heritage NZ DL

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/js/zoomer.js

    r26179 r33156  
    4141                { 
    4242                    //width: "auto" 
    43                 }).mousemove(function (e) 
     43                }).mousemove(function (e,pageX,pageY) 
    4444                { 
     45                        if (!e.pageX) { e.pageX = pageX } 
     46                        if (!e.pageY) { e.pageY = pageY } 
     47 
    4548                    var x = e.pageX - smallArea.offset().left; 
    4649                    var y = e.pageY - smallArea.offset().top; 
     50 
    4751                    if ((x < -expansionSize) || (x > smallArea.width() + expansionSize) || (y < -expansionSize) || (y > smallArea.height() + expansionSize)) 
    4852                    { 
     
    6266                        } 
    6367                    } 
     68 
    6469                    mover.css( 
    6570                    {