@hailin-zheng/editor-core 1.1.20 → 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 +20 -7
- package/index-cjs.js.map +1 -1
- package/index.js +20 -7
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/timeline/TimeValueGridControl.d.ts +1 -1
package/index.js
CHANGED
@@ -11492,7 +11492,7 @@ class ParagraphMeasure {
|
|
11492
11492
|
return;
|
11493
11493
|
//return indent;
|
11494
11494
|
}
|
11495
|
-
const spaceWidth = (limitWidth - paraLineRender.line.rect.width) / (renderUnitCount - 1);
|
11495
|
+
const spaceWidth = (limitWidth - paraLineRender.line.rect.width - paraLineRender.startX) / (renderUnitCount - 1);
|
11496
11496
|
this.setAlignJustify(paraLineRender.line, 0, spaceWidth);
|
11497
11497
|
//return indent;
|
11498
11498
|
}
|
@@ -11508,10 +11508,14 @@ class ParagraphMeasure {
|
|
11508
11508
|
setAlignJustify(render, count, spaceWidth) {
|
11509
11509
|
if (render instanceof BranchRenderObject) {
|
11510
11510
|
let width = 0;
|
11511
|
+
//累计元素的偏移量
|
11512
|
+
let offset = 0;
|
11511
11513
|
for (let i = 0; i < render.length; i++) {
|
11512
11514
|
const currRender = render.getChild(i);
|
11515
|
+
const currWidth = currRender.rect.width;
|
11513
11516
|
count += this.setAlignJustify(currRender, count, spaceWidth);
|
11514
|
-
currRender.rect.x
|
11517
|
+
currRender.rect.x += offset;
|
11518
|
+
offset += currRender.rect.width - currWidth;
|
11515
11519
|
width += currRender.rect.width;
|
11516
11520
|
}
|
11517
11521
|
render.rect.width = width;
|
@@ -19299,8 +19303,8 @@ class SurfaceView extends NodeItems {
|
|
19299
19303
|
class LabelNode extends TextBase {
|
19300
19304
|
constructor() {
|
19301
19305
|
super();
|
19302
|
-
this.border
|
19303
|
-
this.borderColor
|
19306
|
+
// this.border=1;
|
19307
|
+
// this.borderColor='#000';
|
19304
19308
|
}
|
19305
19309
|
_textWrapping = 'no';
|
19306
19310
|
get textWrapping() {
|
@@ -20651,7 +20655,7 @@ class TimelineControl extends AbsolutePanel {
|
|
20651
20655
|
}, 0);
|
20652
20656
|
return finalSize;
|
20653
20657
|
}
|
20654
|
-
|
20658
|
+
reBuild() {
|
20655
20659
|
treeForEach(this, item => {
|
20656
20660
|
if (item instanceof NodeItems) {
|
20657
20661
|
return item.controls;
|
@@ -20835,7 +20839,7 @@ class TimelineGridControl extends TimelineBaseControl {
|
|
20835
20839
|
value: this.randomNum(70, 150)
|
20836
20840
|
});
|
20837
20841
|
}
|
20838
|
-
this.eventData.push({ date: moment$1(this.startTime).add(i, 'days').toDate(), value: '入\r\n
|
20842
|
+
this.eventData.push({ date: moment$1(this.startTime).add(i, 'days').toDate(), value: '入\r\n院\r\n111' });
|
20839
20843
|
}
|
20840
20844
|
this.temperatureData.sort((prev, curr) => {
|
20841
20845
|
return curr.date > prev.date ? 1 : -1;
|
@@ -20843,6 +20847,10 @@ class TimelineGridControl extends TimelineBaseControl {
|
|
20843
20847
|
this.heartRateData.sort((prev, curr) => curr.date > prev.date ? 1 : -1);
|
20844
20848
|
}
|
20845
20849
|
buildOverride(e) {
|
20850
|
+
this.temperatureData.length = 0;
|
20851
|
+
this.heartRateData.length = 0;
|
20852
|
+
this.eventData.length = 0;
|
20853
|
+
this.init();
|
20846
20854
|
this.buildTemperature(e);
|
20847
20855
|
this.buildHearRate(e);
|
20848
20856
|
this.buildStampUnit(e);
|
@@ -21625,7 +21633,7 @@ function createTimeline() {
|
|
21625
21633
|
const timeGridContainer = new TimeGridContainer();
|
21626
21634
|
//timeGridContainer.y = 80;
|
21627
21635
|
const timelineGridControl = timeGridContainer.timelineGridControl; //new TimeLineControl();
|
21628
|
-
timelineGridControl.showDays =
|
21636
|
+
timelineGridControl.showDays = 100;
|
21629
21637
|
timelineGridControl.width = timelineGridControl.getLayoutWidth();
|
21630
21638
|
timelineGridControl.height = 300;
|
21631
21639
|
timelineGridControl.init();
|
@@ -22615,6 +22623,11 @@ class CanvasTextEditor extends AbsolutePanel {
|
|
22615
22623
|
surface.addChild(scrollView);
|
22616
22624
|
surface.addChild(rule2);
|
22617
22625
|
//surface.addChild(win);
|
22626
|
+
//
|
22627
|
+
// setInterval(()=>{
|
22628
|
+
// timeLineControl.reBuild();
|
22629
|
+
// this.onChanged();
|
22630
|
+
// },20)
|
22618
22631
|
surface.start();
|
22619
22632
|
}
|
22620
22633
|
/**
|