vue-cropper icon indicating copy to clipboard operation
vue-cropper copied to clipboard

自动生成截图框时 可否自定义截图框位置 不要默认居中显示

Open danna1005 opened this issue 5 years ago • 2 comments

danna1005 avatar Aug 29 '19 02:08 danna1005

目前还不可以

xyxiao001 avatar Aug 29 '19 02:08 xyxiao001

可以考虑在自动生成截图框后的下一个事件循环中手动修改截图框的尺寸和位置

    this.$nextTick(() => {
       // auto crop
       this.$refs.cropper.goAutoCrop()
       this.$nextTick(() => {
          // if cropped and has position message, update crop box
          this.$refs.cropper.cropOffsertX = selfPositionMsg.x
          this.$refs.cropper.cropOffsertY = selfPositionMsg.y
          this.$refs.cropper.cropW = selfPositionMsg.width
          this.$refs.cropper.cropH = selfPositionMsg.height
        })
     })

AllenChinese avatar Apr 03 '20 10:04 AllenChinese