Browse Source

fix: 喷涂取消横向选择

master
guoapeng 3 weeks ago
parent
commit
834d89e08d
  1. 17
      src/components/spray/trayGraph/index.vue

17
src/components/spray/trayGraph/index.vue

@ -45,10 +45,20 @@ let newWidth = (25 - 5 * 2) * zoom
let newHeight = (75 - 15 * 2) * zoom
const addSelect = () => {
// rect.value = new Konva.Rect({
// x: 5 * zoom,
// y: 15 * zoom,
// width: (25 - 5 * 2) * zoom,
// height: (75 - 15 * 2) * zoom,
// fill: 'rgba(238,10,36, 0.2)',
// draggable: true,
// })
//
rect.value = new Konva.Rect({
x: 5 * zoom,
x: 0,
y: 15 * zoom,
width: (25 - 5 * 2) * zoom,
width: 25 * zoom,
height: (75 - 15 * 2) * zoom,
fill: 'rgba(238,10,36, 0.2)',
draggable: true,
@ -77,7 +87,8 @@ const addSelect = () => {
rotateEnabled: false, //
rotationSnaps: [], //
anchorSize: 20,
enabledAnchors: ['top-center', 'bottom-center', 'middle-left', 'middle-right'], //
// enabledAnchors: ['top-center', 'bottom-center', 'middle-left', 'middle-right'], //
enabledAnchors: ['top-center', 'bottom-center'], //
boundBoxFunc(oldBoundBox, newBoundBox) {
const stageWidth = stage.value.width()
const stageHeight = stage.value.height()

Loading…
Cancel
Save