@hailin-zheng/editor-core 1.1.21 → 1.1.22

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/index-cjs.js CHANGED
@@ -11538,10 +11538,14 @@ class ParagraphMeasure {
11538
11538
  setAlignJustify(render, count, spaceWidth) {
11539
11539
  if (render instanceof BranchRenderObject) {
11540
11540
  let width = 0;
11541
+ //累计元素的偏移量
11542
+ let offset = 0;
11541
11543
  for (let i = 0; i < render.length; i++) {
11542
11544
  const currRender = render.getChild(i);
11545
+ const currWidth = currRender.rect.width;
11543
11546
  count += this.setAlignJustify(currRender, count, spaceWidth);
11544
- currRender.rect.x += width;
11547
+ currRender.rect.x += offset;
11548
+ offset += currRender.rect.width - currWidth;
11545
11549
  width += currRender.rect.width;
11546
11550
  }
11547
11551
  render.rect.width = width;
@@ -19329,8 +19333,8 @@ class SurfaceView extends NodeItems {
19329
19333
  class LabelNode extends TextBase {
19330
19334
  constructor() {
19331
19335
  super();
19332
- this.border = 1;
19333
- this.borderColor = '#000';
19336
+ // this.border=1;
19337
+ // this.borderColor='#000';
19334
19338
  }
19335
19339
  _textWrapping = 'no';
19336
19340
  get textWrapping() {
@@ -20681,7 +20685,7 @@ class TimelineControl extends AbsolutePanel {
20681
20685
  }, 0);
20682
20686
  return finalSize;
20683
20687
  }
20684
- rebuild() {
20688
+ reBuild() {
20685
20689
  treeForEach(this, item => {
20686
20690
  if (item instanceof NodeItems) {
20687
20691
  return item.controls;
@@ -20865,7 +20869,7 @@ class TimelineGridControl extends TimelineBaseControl {
20865
20869
  value: this.randomNum(70, 150)
20866
20870
  });
20867
20871
  }
20868
- this.eventData.push({ date: moment__default$1["default"](this.startTime).add(i, 'days').toDate(), value: '入\r\n' });
20872
+ this.eventData.push({ date: moment__default$1["default"](this.startTime).add(i, 'days').toDate(), value: '入\r\n院\r\n111' });
20869
20873
  }
20870
20874
  this.temperatureData.sort((prev, curr) => {
20871
20875
  return curr.date > prev.date ? 1 : -1;
@@ -20873,6 +20877,10 @@ class TimelineGridControl extends TimelineBaseControl {
20873
20877
  this.heartRateData.sort((prev, curr) => curr.date > prev.date ? 1 : -1);
20874
20878
  }
20875
20879
  buildOverride(e) {
20880
+ this.temperatureData.length = 0;
20881
+ this.heartRateData.length = 0;
20882
+ this.eventData.length = 0;
20883
+ this.init();
20876
20884
  this.buildTemperature(e);
20877
20885
  this.buildHearRate(e);
20878
20886
  this.buildStampUnit(e);
@@ -21655,7 +21663,7 @@ function createTimeline() {
21655
21663
  const timeGridContainer = new TimeGridContainer();
21656
21664
  //timeGridContainer.y = 80;
21657
21665
  const timelineGridControl = timeGridContainer.timelineGridControl; //new TimeLineControl();
21658
- timelineGridControl.showDays = 30;
21666
+ timelineGridControl.showDays = 100;
21659
21667
  timelineGridControl.width = timelineGridControl.getLayoutWidth();
21660
21668
  timelineGridControl.height = 300;
21661
21669
  timelineGridControl.init();
@@ -22645,6 +22653,11 @@ class CanvasTextEditor extends AbsolutePanel {
22645
22653
  surface.addChild(scrollView);
22646
22654
  surface.addChild(rule2);
22647
22655
  //surface.addChild(win);
22656
+ //
22657
+ // setInterval(()=>{
22658
+ // timeLineControl.reBuild();
22659
+ // this.onChanged();
22660
+ // },20)
22648
22661
  surface.start();
22649
22662
  }
22650
22663
  /**