@meta2d/core 1.1.11 → 1.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/pen/render.js CHANGED
@@ -774,7 +774,7 @@ export function getTextColor(pen, store) {
774
774
  function drawText(ctx, pen) {
775
775
  const { fontStyle, fontWeight, fontSize, fontFamily, lineHeight, text, hiddenText, canvas, textHasShadow, textBackground, textType, } = pen.calculative;
776
776
  if (pen.input &&
777
- !pen.text &&
777
+ isEmptyText(pen.text) &&
778
778
  !(pen.calculative.canvas.inputDiv.dataset.penId === pen.id) &&
779
779
  !pen.onShowInput) {
780
780
  ctx.save();
@@ -3373,7 +3373,7 @@ export function calcInView(pen, calcChild = false) {
3373
3373
  pen.calculative.inView = false;
3374
3374
  }
3375
3375
  }
3376
- if (store.data.locked) {
3376
+ if (store.data.locked && pen.calculative.inView) {
3377
3377
  pen.calculative.inView = hasPermission(pen, store.options.roles);
3378
3378
  }
3379
3379
  // TODO: 语义化上,用 onValue 更合适,但 onValue 会触发 echarts 图形的重绘,没有必要
@@ -3389,7 +3389,7 @@ function hasPermission(pen, roles) {
3389
3389
  return hasPermission(getParent(pen, false), roles);
3390
3390
  }
3391
3391
  else {
3392
- return true;
3392
+ return pen.calculative.inView;
3393
3393
  }
3394
3394
  }
3395
3395
  else {