Closed dutzi closed 2 years ago
It seems like an issue related to how Konva is packaged.
When calling window.Konva
(instead of importing) everything works.
Thank you for reporting this. I wonder if changing Peaks.js to use Webpack or Parcel would help?
Happy to help. I'll give it a shot, I think Rollup is more oriented towards third party libraries, like Peaks.js.
This is now fixed in v0.27.0, and I've updated the React example.
You can either use the Peaks.js ES bundle with Webpack or Rollup etc, or there is the peaks.ext.js / peaks.ext.min.js UMD build that does not include Konva.
I'm trying to implement customized segment markers, but it seems that many popular build tools (Webpack, when using Create React App and Parcel) are breaking them, making them non-interact-able.
I've forked @chrisn's React Example, and made this.
I then created a
createSegmentMarker
function that instantiates theDefaultSegmentMarker
I took straight from Peaks.js' code.When running my fork you can create a segment (by clicking on Create Segment), and it will work, but that segment is not intractable. I.e., you cannot drag its handles to resize it.