Page MenuHomePhabricator

Superimpose another image as click destination
Open, MediumPublicFeature

Description

For maps it would be a great improvement if the imagemap extension can
superimpose another, smaller, image as link destination.

Example for a map with a red dot as superimposed image, followed by the link
destination:

<imagemap>
Image:ExampleMap.JPG|500px|Test map
circ 52 34 5 [[Image:Reddot.svg|5px]] [[Link destination]]
desc none
</imagemap>


Version: unspecified
Severity: enhancement

Details

Reference
bz8657

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:31 PM
bzimport added a project: ImageMap.
bzimport set Reference to bz8657.
bzimport added a subscriber: Unknown Object (MLST).

Not sure how best to accomplish this... CSS positioning? Server-side
composition? SVG?

Assigned to extension developer

rene.kijewski wrote:

proposed patch

This patch implements the new "shape" image, and allows relative and negative positions.
With it you could use a line like

image 50% 50% none [[File:Test.png|20px|link=test page|Some description]]

where "image" means to add a superimposing image. "50% 50%" is the base position. "none" is the alignment of the superimposing image (hereby centered). Available are the same positions as for "desc". So top-left means the base position is the upper left position of the superimposing image. bottom-right would be the lower right corner and so on.
The relative positions work for real shapes as well:

rect 10% 10% -10% -10% [[Test]]

would add a rectangle with a margin of 10% in height and width.

There are some new messages I don't have written yet.

attachment ImageMap_body.php.diff ignored as obsolete

rene.kijewski wrote:

minor errors, extended link syntax

I made <imagemap> understand lines like

circle 1 2 3 Test

so {{#tag:imagemap}} could be used for location maps. Normal link don't work, because <imagemap> gets the parsed links and not the plain text.

attachment ImageMap_body.php.diff ignored as obsolete

rene.kijewski wrote:

Moved (now) redundant code into a static method; links no more have to be well formed

Attached:

*Bulk BZ Change: +Patch to open bugs with patches attached that are missing the keyword*

sumanah wrote:

René Kijewski, thank you for your patch, and my apologies that it's taken so long for us to respond to you. I'm adding the "need-review" keyword to mark this bug as containing a patch that needs review. Thanks again. If you want to
talk about your patch and get it reviewed faster, please feel free to visit
#mediawiki in freenode IRC -- http://webchat.freenode.net/?channels=#mediawiki

sumanah wrote:

René Kijewski, again, my regrets at the delay in response to your patch.

You will get your patch reviewed faster if you get Developer access

https://www.mediawiki.org/wiki/Developer_access

and submit your change directly into our source control system:

https://www.mediawiki.org/wiki/Git/Workflow

Thanks!

sumanah wrote:

Dan, is this worth an update & a push into Gerrit?

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 12:24 PM
Aklapper removed a subscriber: wikibugs-l-list.