cnhis-design-vue 3.4.0-beta.12 → 3.4.0-beta.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.
@@ -34,6 +34,7 @@ function useElectrocardiogram(canvas, propItems, flag) {
|
|
34
34
|
rowNumber,
|
35
35
|
lineStyle,
|
36
36
|
titleStyle,
|
37
|
+
titleOffset,
|
37
38
|
config,
|
38
39
|
calibrationLineHeight
|
39
40
|
} = propItems;
|
@@ -105,19 +106,28 @@ function useElectrocardiogram(canvas, propItems, flag) {
|
|
105
106
|
if (arguments.length)
|
106
107
|
return;
|
107
108
|
drawCalibrationLine({ x, y }, lineStyle);
|
108
|
-
|
109
|
-
...titleStyle,
|
110
|
-
left: x + (columnNumber === 4 ? xCellWidth : xCellWidth / 2),
|
111
|
-
top: y,
|
112
|
-
originX: "left",
|
113
|
-
originY: "bottom",
|
114
|
-
objectCaching: false
|
115
|
-
});
|
116
|
-
fixedPointsCache.add(title);
|
109
|
+
drawTitle(lineItem, x, y);
|
117
110
|
});
|
118
111
|
const renderObjects = arguments.length ? [...gridPoints] : [...gridPoints, ...fixedPointsCache];
|
119
112
|
canvas.value.add(...renderObjects);
|
120
113
|
}
|
114
|
+
function drawTitle(lineItem, x, y) {
|
115
|
+
var _a, _b;
|
116
|
+
if (!lineItem.title)
|
117
|
+
return;
|
118
|
+
const titleOriginX = x + (columnNumber === 4 ? xCellWidth : xCellWidth / 2);
|
119
|
+
const titleX = titleOriginX + ((_a = titleOffset == null ? void 0 : titleOffset.x) != null ? _a : 0);
|
120
|
+
const titleY = y + ((_b = titleOffset == null ? void 0 : titleOffset.y) != null ? _b : 0);
|
121
|
+
const title = new fabric.Text(String(lineItem.title), {
|
122
|
+
...titleStyle,
|
123
|
+
left: titleX,
|
124
|
+
top: titleY,
|
125
|
+
originX: "left",
|
126
|
+
originY: "bottom",
|
127
|
+
objectCaching: false
|
128
|
+
});
|
129
|
+
fixedPointsCache.add(title);
|
130
|
+
}
|
121
131
|
function bindPointEvent(polyline, options) {
|
122
132
|
useDetailEvent(polyline, options);
|
123
133
|
}
|
@@ -137,6 +137,7 @@ function useElectrocardiogramChart(canvas, props, emits, canvasRef, pointTipProp
|
|
137
137
|
borderStyle: { ...defaultBorderStyle, ...props.data.borderStyle },
|
138
138
|
lineStyle: { ...defaultLineStyle, ...props.data.lineStyle },
|
139
139
|
titleStyle: { ...defaultTextStyle, ...props.data.titleStyle },
|
140
|
+
titleOffset: props.data.titleOffset,
|
140
141
|
measureLineStyle: { ...defaultLineStyle, ...props.data.measureLineStyle },
|
141
142
|
measureTextStyle: { ...defaultTextStyle, ...props.data.measureTextStyle },
|
142
143
|
grid: props.data.grid,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "cnhis-design-vue",
|
3
|
-
"version": "3.4.0-beta.
|
3
|
+
"version": "3.4.0-beta.13",
|
4
4
|
"license": "ISC",
|
5
5
|
"module": "./es/components/index.js",
|
6
6
|
"main": "./es/components/index.js",
|
@@ -73,5 +73,5 @@
|
|
73
73
|
"iOS 7",
|
74
74
|
"last 3 iOS versions"
|
75
75
|
],
|
76
|
-
"gitHead": "
|
76
|
+
"gitHead": "c01fe58ff9e6c3986b3a5aeddf066f8b0501944d"
|
77
77
|
}
|