Skip to main content

Bug Tracker

Side navigation

#5266 closed bug (worksforme)

Opened September 17, 2009 11:38PM UTC

Closed November 19, 2010 01:47AM UTC

Last modified October 17, 2013 07:54PM UTC

.position() report incorrect value for AREA elements of an image map

Reported by: matdumsa Owned by: brandon
Priority: major Milestone: 1.4
Component: dimensions Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

Hi,

when the .position() method is called on a AREA object, the position of the attached Image is returned instead of the proper expected value: the position of that area relative to its parent.

This breaks a lot of things one would like to do with an image map.

Please see this live example.

http://mathieusavard.info/jquery/example1.html

Attachments (0)
Change History (3)

Changed November 19, 2010 01:47AM UTC by dmethvin comment:1

resolution: → worksforme
status: newclosed

Just use e.pageX and e.pageY to determine the mouse position.

Changed August 03, 2012 08:45PM UTC by craig@renewfund.com comment:2

The original ticket seems to be asking for logical functionality to me. I'm not sure why substituting another value (mouse position) for the requested value (the position of the map area) would be considered worth closing the bug.

Imagine if you were triggering events outside of the image and wanted an effect over a particular area of the image map. Mouse position would be absolutely useless for that.

Changed October 17, 2013 07:54PM UTC by adam.fasoldt@gmail.com comment:3

Agreed.

For example, I'm trying to get the .position of a ('map area') in Drupal so that I can position a Dialog box over it. Instead, all of the dialogs get dropped into a corner.