MediaWiki talk:Gadget-ImageAnnotator.js

Latest comment: 19 hours ago by Artoria2e5 in topic No inline/thumb annotations now?
MediaWiki:Gadget-ImageAnnotator.js forms part of the MediaWiki interface and can only be edited by administrators, stewards and interface editors.
To request a change to MediaWiki:Gadget-ImageAnnotator.js, add {{Edit request}} to this talk page, followed by a description of your request.
This gadget is enabled globally for everyone through an inclusion in MediaWiki:Common.js. You need not (and in fact, cannot) enable it in any way; it is already enabled. In case of an insurmountable problem, there's an emergency switch-off that logged-in users can use: just enable at Special:Preferences→Gadgets the gadget for "disabling image annotations". If you feel the need to do that, please also report your problem here.

To see all annotated images, visit Category:Images with annotations.
Documentation on this script is at Help:Gadget-ImageAnnotator.

Archives
Conversations older than 7 days will be archived automatically.
Pending tasks for Gadget-ImageAnnotator.js: edit this list - add to watchlist - purge
None of these need to be fixed immediately, but they should be looked at eventually.
  • Provide a way to edit rectangles (allow size changes).
  • Icons instead of rectangles for some notes? (See here and here.)
  • Grouping of notes into layers? (See here.)
ImageAnnotator's Documentation.
ImageAnnotator's Frequently Asked Questions.
ImageAnnotator's technical Forum.
ImageAnnotator's non-technical Forum.
Image note guideline.

Not showing when browsing zoomed in

Image for: Not showing when browsing zoomed in
edit

I usually browse at 133% zoom. Both annotations and the "add notes" button dont show up. RoyZuo (talk) 06:10, 26 March 2025 (UTC)Reply

the problem seems to occur only when the image would go beyond the width. so for example File:" 12 - ITALY - Gun Collection FLOS 3.JPG is still within the width of the page annotations can be shown. RoyZuo (talk) 06:53, 26 March 2025 (UTC)Reply
It looks like it's failing the img_check() when the image is scaled because of https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+blame/f172d591dfd6180b0a552fc2e3c50dd5e6770ad3/resources/src/mediawiki.action/mediawiki.action.view.filepage.less#196 . I'm not sure why that's breaking *now* and not 2 years ago when that change was made though. I'm not sure what the best way to fix it is either; the #file img {max-width: unset !important;} I threw in my common.css to test probably isn't it, but I don't exactly trust ImageAnnotator enough to remove the exact size check. TheDJ, any thoughts? AntiCompositeNumber (talk) 21:03, 1 May 2025 (UTC)Reply
It seems to make some assumptions about having space available and images not ever being scaled. That seems a somewhat strict assumption, that should probably be modified. I'll see if I can modify the gadget.
// Quit if the image wasn't loaded properly for some reason:
if ( w != srcW || Math.abs( srcH - h ) > 1 ) { // `h != srcH` but allowing for off-by-one error / rounding (works around T370300)
	return null;
}
TheDJ (talkcontribs) 08:57, 6 June 2025 (UTC)Reply

No inline/thumb annotations now?

Image for: No inline/thumb annotations now?
edit

Example in Help:Image-Annotator#Inline_display_of_annotations is not working for me on:

  • Firefox Dev 140.0 (Windows 11), logged in AND in private mode
  • Edge 137.0.3296.62 (Windows 11), not logged in

Clicking through to the file page works. What is going on? Artoria2e5 contribs 09:55, 6 June 2025 (UTC)Reply

Return to "Gadget-ImageAnnotator.js" page.