Changeset 33156


Ignore:
Timestamp:
2019-06-15T15:32:47+12:00 (5 years 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

File:
1 edited

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                    {
Note: See TracChangeset for help on using the changeset viewer.