Skip to content
This repository was archived by the owner on Apr 10, 2020. It is now read-only.

More forgiving image height/width requirements#24

Open
brockfanning wants to merge 1 commit into
etienne-martin:masterfrom
brockfanning:more-forgiving-height-and-width-requirements
Open

More forgiving image height/width requirements#24
brockfanning wants to merge 1 commit into
etienne-martin:masterfrom
brockfanning:more-forgiving-height-and-width-requirements

Conversation

@brockfanning
Copy link
Copy Markdown
Contributor

Currently the image for the image map is required to have "height" and "width" attributes in the HTML markup. Otherwise, a javascript alert pops up. This update does 2 things:

  1. Use a console log instead of an alert. The reason for this is that this library may be used in CMS situations, potentionally with AJAX edit-in-place functionality, and a javascript alert can cause issues when a user tries to save their work but forgot to include height/width.
  2. Try to get the dimensions of the image through javascript, before giving up. This is useful if Mapify is to be implemented on a site that already has existing image maps throughout it, many of which may not have height/width attributes on the image.

@brockfanning brockfanning force-pushed the more-forgiving-height-and-width-requirements branch from 798582e to 011140d Compare February 1, 2017 03:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant