@meta2d/form-diagram
Advanced tools
Comparing version 1.0.13 to 1.0.14
{ | ||
"name": "@meta2d/form-diagram", | ||
"version": "1.0.13", | ||
"version": "1.0.14", | ||
"description": "The form library based on le5le meta2d.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -45,3 +45,3 @@ var __values = (this && this.__values) || function(o) { | ||
ctx.fillStyle = '#fff0'; | ||
ctx.rect(x, y, width, height); | ||
ctx.rect(x - 1, y - 1, width + 2, height + 2); | ||
ctx.fill(); | ||
@@ -183,16 +183,33 @@ ctx.clip(); | ||
// if (!pen.width) { | ||
pen.width = width; | ||
pen.height = finalHight || height; | ||
pen.calculative.width = width; | ||
pen.calculative.height = finalHight || height; | ||
pen.calculative.width = width; | ||
pen.calculative.height = finalHight || height; | ||
pen.calculative.maxOffsetY = | ||
(height - finalHight) / pen.calculative.canvas.store.data.scale; | ||
if (!pen.height) { | ||
pen.height = pen.calculative.height; | ||
} | ||
if (!pen.width) { | ||
pen.width = pen.calculative.width; | ||
} | ||
var x = pen.x; | ||
var y = pen.y; | ||
if (pen.parentId) { | ||
var parentPen = pen.calculative.canvas.store.pens[pen.parentId]; | ||
x = | ||
parentPen.calculative.worldRect.x + | ||
parentPen.calculative.worldRect.width * pen.x; | ||
y = | ||
parentPen.calculative.worldRect.y + | ||
parentPen.calculative.worldRect.height * pen.y; | ||
} | ||
pen.calculative.worldRect = { | ||
x: pen.x, | ||
y: pen.y, | ||
height: pen.height, | ||
width: pen.width, | ||
x: x, | ||
y: y, | ||
height: pen.calculative.height, | ||
width: pen.calculative.width, | ||
center: { | ||
x: pen.x + pen.width / 2, | ||
y: pen.y + pen.height / 2, | ||
x: pen.x + pen.calculative.width / 2, | ||
y: pen.y + pen.calculative.height / 2, | ||
}, | ||
@@ -214,3 +231,3 @@ }; | ||
// 绘画最外框 | ||
ctx.beginPath(); | ||
// ctx.beginPath(); | ||
// ctx.rect(worldRect.x, worldRect.y, worldRect.width, worldRect.height); | ||
@@ -319,5 +336,5 @@ var wr = pen.calculative.borderRadius || 0, hr = wr; | ||
ctx.fillStyle = '#fff0'; | ||
ctx.rect(x, y + | ||
(pen.rowPos[0] * pen.calculative.worldRect.height) / pen.tableHeight, width, height - | ||
(pen.rowPos[0] * pen.calculative.worldRect.height) / pen.tableHeight); | ||
ctx.rect(x - 1, y + | ||
(pen.rowPos[0] * pen.calculative.worldRect.height) / pen.tableHeight - 1, width + 2, height - | ||
(pen.rowPos[0] * pen.calculative.worldRect.height) / pen.tableHeight + 2); | ||
ctx.fill(); | ||
@@ -324,0 +341,0 @@ ctx.clip(); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
170382
2368