Results 1 to 5 of 5

Thread: Featured Image Zoomer - mousewheel dead

  1. #1
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,072
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default Featured Image Zoomer - mousewheel dead

    1) Script Title: Featured Image Zoomer v1.5

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...uredzoomer.htm

    3) Describe problem: See:

    http://bugs.jquery.com/ticket/10420

    where it's relayed that jQuery no longer supports either detail or wheelDelta or any equivalent on any mouse wheel events and apparently doesn't intend to in the future.

    This can be fixed in our script by adding the highlighted as shown:

    Code:
    	magnifyimage: function($tracker, e, zoomrange){
    		if(!e.detail && !e.wheelDelta){e = e.originalEvent;}
    		var delta=e.detail? e.detail*(-120) : e.wheelDelta //delta returns +120 when wheel is scrolled up, -120 when scrolled down
    		var zoomdir=(delta<=-120)? "out" : "in"
    		var specs=$tracker.data('specs')
    		var magnifier=specs.magnifier, od=specs.imagesize, power=specs.curpower
    		var newpower=(zoomdir=="in")? Math.min(power+1, zoomrange[1]) : Math.max(power-1, zoomrange[0]) //get new power
    		var nd=[od.w*newpower, od.h*newpower] //calculate dimensions of new enlarged image within magnifier
    		magnifier.$image.css({width:nd[0], height:nd[1]})
    		specs.curpower=newpower //set current power to new power after magnification
    		specs.$statusdiv.html('Current Zoom: '+specs.curpower)
    		this.showstatusdiv(specs, 0, 500)
    		$tracker.trigger('mousemove')
    	},
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  2. #2
    Join Date
    Aug 2004
    Posts
    9,903
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    Awesome, thanks for the heads up John! I'll update the script in the next couple of days with the fix.
    DD Admin

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,072
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    We're still waiting . . .
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  4. #4
    Join Date
    Aug 2004
    Posts
    9,903
    Thanks
    3
    Thanked 967 Times in 955 Posts
    Blog Entries
    15

    Default

    Ah yes another one that slipped through the cracks. Thanks for the update, .js file of script updated.
    DD Admin

  5. #5
    Join Date
    May 2012
    Location
    Hitchhiking the Galaxy
    Posts
    1,013
    Thanks
    47
    Thanked 139 Times in 139 Posts
    Blog Entries
    1

    Default


    Please start a new thread for this question
    "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program." - Linus Torvalds
    Anime Views Forums
    Bernie

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •