MCPcopy Create free account
hub / github.com/CoderOpen/waimai / drawLine

Method drawLine

front/components/mpvueGestureLock/gestureLock.js:91–102  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

89
90 // 画线 - 返回 样式 对象
91 drawLine(start, end) {
92 const width = this.getPointDis(start.x, start.y, end.x, end.y);
93 const rotate = this.getAngle(start, end);
94
95 return {
96 activeLeft: start.x + 'px',
97 activeTop: start.y + 'px',
98 activeWidth: width + 'px',
99 activeRotate: rotate + 'deg'
100 }
101
102 }
103
104 // 获取 画线的 角度
105 getAngle(start, end) {

Callers 2

checkTouchMethod · 0.95
moveDrawMethod · 0.95

Calls 2

getPointDisMethod · 0.95
getAngleMethod · 0.95

Tested by

no test coverage detected