I have a single div that I need to zoom and also track real-time position with the probe module.
I have been fighting with this for days.
To use just zoom I do this:
new webpack.ProvidePlugin({
IScroll: 'iscroll/build/iscroll-zoom.js'
}),
This obviously does not get me iscroll-probe
I also tried this.
iScrollModule.js
export * from "iscroll/build/iscroll-zoom.js";
export * from "iscroll/build/iscroll-probe.js";
export class IScroll { }
and then added this to my webpack config
new webpack.ProvidePlugin({
IScroll: path.resolve('./app/iScrollModule')
})
Then I get IScroll is not a constructor when I try to use it.
I also tried cutting and pasting all of iscroll-zoom and iscroll-probe into a single file and including that instead but this does not work either.
My final attempt is going to be:
new webpack.ProvidePlugin({
IScroll: 'iscroll/build/iscroll-zoom.js'
}),
new webpack.ProvidePlugin({
IScrollProbe: 'iscroll/build/iscroll-probe.js'
})
which I think might work but then I seem to have to create an IScroll and an IScrollZoom on the same div which isn't really what I want since I think it is going to have other ramifications.
I have tried every solution I have found out there and none have worked. Any help would be greatly appreciated!!
Thanks,
~Tim