12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- import { number } from "vue-types";
- const CONST = {
- MODE_SEL_RECT: 1,
- MODE_MOVING: 2,
- MODE_ROTATE: 3,
- MODE_SCALE_WIDTH: 4,
- MODE_SCALE_SCALE: 5,
- MODE_RULER_LINE: 6,
- MODE_RULER_DRAG: 7,
- MODE_NONE: 0,
- };
- const downOptions = {
- _mouseDownTimestamp: Date.now(),
- _state: CONST.MODE_NONE,
- _downClientX: 0,
- _downClientY: 0,
- _downed: false,
- _mouseDownFlag: "",
- };
- const moveOptions = {
- _movePreClientY: 0,
- _movePreClientX: 0,
- _initMovePos: {x: -1, y: -1},
- }
- const rotateOptions = {
- rotateCenter: undefined as any,// {x: 0, y: 0}
- ratatePre: 0,
- lastRad: 0,
- rotateCmd: false,
- objinitAngleRad: 0,
- }
- const scaleOptions = {
- scalePivot: undefined as any,
- scaleIndex: -1,
- mainAxisVector: {x: 0, y: 0},
- initScale: {x: 1, y: 1},
- initScaleWith: {w: 0, h: 0},
- mainAxisVectorLenth: 0,
- xAxisVector:{x: 1, y: 1},
- xAxisVectorLength: 0,
- yAxisVector: {x: 1, y: 1},
- yAxisVectorLength: 0,
- scaleCmd: false,
- lastScale: {x:1, y: 1},
- }
- export { downOptions , CONST, moveOptions, rotateOptions, scaleOptions};
|