-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use leaflet-distortable-image 0.3.0 via NPM #4
base: master
Are you sure you want to change the base?
Conversation
@@ -1,7 +1,7 @@ | |||
import { MapLayer, withLeaflet } from 'react-leaflet'; | |||
import PropTypes from 'prop-types'; | |||
|
|||
import './lib/leaflet-distortableimage'; | |||
import './node_modules/leaflet-distortable-image/dist/Leaflet.DistortableImage.js'; | |||
import './lib/leaflet-path-transform'; | |||
import L from 'leaflet'; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So in Props
below, I think we would need to follow guidance in publiclab/Leaflet.DistortableImage#132 and add suppressToolbar: true
, but I'm not 100% sure how this gets fed into the multiple instances below of new L.DistortableImageOverlay(props.url, this.getOptions(props));
- i see three in this file, for example:
@@ -1,7 +1,7 @@ | |||
import { MapLayer, withLeaflet } from 'react-leaflet'; | |||
import PropTypes from 'prop-types'; | |||
|
|||
import './lib/leaflet-distortableimage'; | |||
import './node_modules/leaflet-distortable-image/dist/Leaflet.DistortableImage.js'; | |||
import './lib/leaflet-path-transform'; | |||
import L from 'leaflet'; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't get this compiling but I'm certain it's a problem with the way I've configured the project with create-react-library
. Thanks for the upstream changes. I'll look at getting this in soon as I can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, this was just my guess... that's where npm would install the lib but I haven't tried running npm install
to see if it actually shows up there. If you share your error maybe I can help debug!
Using https://github.com/publiclab/Leaflet.DistortableImage/releases/tag/v0.3.0 directly!
publiclab/Leaflet.DistortableImage#105