-
Notifications
You must be signed in to change notification settings - Fork 287
Open
Labels
Description
Describe the bug:
Readme is incomplete: misses a mention that leaflet-toolbar & its CSS files are peer dependencies, i.e. not automatically added by yarn add and the like, neither automatically imported.
Reproduce the behavior:
1
import 'leaflet-distortableimage'
import 'leaflet-distortableimage/dist/leaflet.distortableimage.css'Uncaught TypeError TypeError: Cannot read properties of undefined (reading 'Action')
at 941 (__dir__/src/edit/actions/EditAction.js:4:34)
at <anonymous> (__dir__/webpack/startup:3:1)
at ../leaflet-distortableimage/dist/leaflet.distortableimage.js (__dir__/leaflet-distortableimage/dist/leaflet.distortableimage.js:2:83840)
at __webpack_require__ (__dir__/webpack/bootstrap:22:1)
at fn (__dir__/webpack/runtime/hot module replacement:61:1)
at ./src/index.js (localhost꞉3000/index.bundle.js?3457720cccda14f87b35=:108909:84)
at __webpack_require__ (__dir__/webpack/bootstrap:22:1)
at <anonymous> (__dir__/webpack/startup:6:1)
at <anonymous> (localhost꞉3000/index.bundle.js?3457720cccda14f87b35=:110466:12)
2
import 'leaflet-distortableimage'
import 'leaflet-distortableimage/dist/leaflet.distortableimage.css'
import 'leaflet-toolbar'Same error
3
import 'leaflet-toolbar'
import 'leaflet-distortableimage'
import 'leaflet-distortableimage/dist/leaflet.distortableimage.css'Shows distortable image overlay, but:
4
import 'leaflet-toolbar'
import 'leaflet-toolbar/dist/leaflet.toolbar.css'
import 'leaflet-distortableimage'
import 'leaflet-distortableimage/dist/leaflet.distortableimage.css'Works!
Readme should mention that you have to import (or similar) leaflet-toolbar & its CSS files before importing leaflet-distortableimage, e.g. 4.
Browser, version, and operating system:
any