baijunjie / PhotoClip.js

一款手势驱动的裁图插件 / A gesture to drive image cropping plug-in
MIT License
638 stars 216 forks source link

点击图片重新选择配置 #106

Closed hlovingness closed 4 years ago

hlovingness commented 4 years ago

修改源码,在iScroll添加 配置

this._iScroll = new IScroll(this._$clipLayer, {
            preventDefault: false, // 添加这个
            zoom: true,
            scrollX: true,
            scrollY: true,
            freeScroll: true,
            mouseWheel: true,
            disablePointer: true, // important to disable the pointer events that causes the issues
            disableTouch: false, // false if you want the slider to be usable with touch devices
            disableMouse: false, // false if you want the slider to be usable with a mouse (desktop)
            wheelAction: 'zoom',
            bounceTime: 300
        });
baijunjie commented 4 years ago

Demo 中可以重現你的問題嗎?

hlovingness commented 4 years ago

load 图片后,我想要点击加载的图片再次触发选择文件,目前点击图片

baijunjie commented 4 years ago

你可以在插件生成的 dom 上方覆蓋一個你自己定義的 dom 來執行你的操作

hlovingness commented 4 years ago

可以解决,还有个需求是希望添加文本自动换行

baijunjie commented 4 years ago

這個插件好像跟文本沒有直接關聯吧? 是哪裡的文字?