Comments (3)
then when importing imageMap it crashes because jQuery is not defined.
It should not crash. There may be an issue with the module packaging or newer versions of node
. I will investigate. What is the error message or console output? Also, what module loader are you using?
jQuery should be optional
...
Can you make jQuery optional?
jQuery is indeed optional, since the plugin works with plain JS (ref). But, of course, it can also be used with jQuery (ref). image-map
defines peerDependencies
instead of optionalDependencies
because the latter did not exist when this was originally authored (and peer is/was the convention for jQuery plugins at the time); this may warrant and update.
from image-map.
@jdescelliers - it looks like this line in the bundled dist is the culprit (and similar issue for non-module file as well). I will push a fix once I get the bundler properly configured.
image-map/dist/image-map.es.js
Line 8 in 0217b18
from image-map.
I published image-map
v2.0.0 which no longer depends on JQuery. The jQuery version is now a separate bundle (docs).
from image-map.
Related Issues (20)
- Unable to get property fn in Ionic
- A little help on debugging (if possible) HOT 5
- Responsive and Mapping HOT 1
- Is there a React Native implementation as well ? HOT 2
- Performance with lots of areas HOT 7
- How to use in Nuxt.js app. HOT 2
- Coords "0,0" on page load. HOT 6
- Highlight region on hover HOT 4
- Generating image maps
- Map does not resize properly on IE11 HOT 2
- Map does not resize on Safari HOT 1
- SSL Certificate Expired In Demo HOT 1
- How can I use this in React JS? HOT 11
- responsive not right.
- Import HOT 1
- Demo link in the docs is not working HOT 1
- Not working on google chrome
- import ImageMap from "image-map" not working
- your library is working fine on local, it's responsive, but not on production
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from image-map.