@visactor/vtable-calendar 1.25.1-alpha.0 → 1.25.1-alpha.1
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/dist/vtable-calendar.js +36 -23
- package/dist/vtable-calendar.min.js +1 -1
- package/package.json +4 -4
package/dist/vtable-calendar.js
CHANGED
|
@@ -14972,9 +14972,10 @@
|
|
|
14972
14972
|
}), context.highPerformanceRestore(), context.setTransformForCurrent();
|
|
14973
14973
|
} else {
|
|
14974
14974
|
const {
|
|
14975
|
-
backgroundCornerRadius: backgroundCornerRadius
|
|
14975
|
+
backgroundCornerRadius: backgroundCornerRadius,
|
|
14976
|
+
backgroundOpacity = 1
|
|
14976
14977
|
} = graphic.attribute;
|
|
14977
|
-
context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, !0), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
|
|
14978
|
+
context.highPerformanceSave(), context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute), context.globalAlpha = backgroundOpacity, context.fillStyle = background, backgroundCornerRadius ? (createRectPath(context, b.x1, b.y1, b.width(), b.height(), backgroundCornerRadius, !0), context.fill()) : context.fillRect(b.x1, b.y1, b.width(), b.height()), context.highPerformanceRestore();
|
|
14978
14979
|
}
|
|
14979
14980
|
shouldReCalBounds && boundsAllocate.free(b), restore();
|
|
14980
14981
|
}
|
|
@@ -32420,7 +32421,31 @@
|
|
|
32420
32421
|
return graphicCreator.symbol(style);
|
|
32421
32422
|
}
|
|
32422
32423
|
_renderHandlerText(value, position) {
|
|
32423
|
-
|
|
32424
|
+
return graphicCreator.text(this._getHandlerTextAttributes(value, position));
|
|
32425
|
+
}
|
|
32426
|
+
_getHandlerPosition(isStart) {
|
|
32427
|
+
return this.attribute.range && isStart ? "start" : "end";
|
|
32428
|
+
}
|
|
32429
|
+
_getHandlerTextStyle(value, position) {
|
|
32430
|
+
const {
|
|
32431
|
+
align: align,
|
|
32432
|
+
handlerSize = 14,
|
|
32433
|
+
handlerText = {},
|
|
32434
|
+
railHeight: railHeight,
|
|
32435
|
+
railWidth: railWidth,
|
|
32436
|
+
slidable: slidable
|
|
32437
|
+
} = this.attribute;
|
|
32438
|
+
return isFunction$3(handlerText.style) ? handlerText.style(value, position, {
|
|
32439
|
+
layout: this.attribute.layout,
|
|
32440
|
+
align: align,
|
|
32441
|
+
railWidth: railWidth,
|
|
32442
|
+
railHeight: railHeight,
|
|
32443
|
+
handlerSize: handlerSize,
|
|
32444
|
+
slidable: slidable
|
|
32445
|
+
}) : handlerText.style;
|
|
32446
|
+
}
|
|
32447
|
+
_getHandlerTextAttributes(value, position) {
|
|
32448
|
+
var _a, _b;
|
|
32424
32449
|
const {
|
|
32425
32450
|
align: align,
|
|
32426
32451
|
handlerSize = 14,
|
|
@@ -32432,13 +32457,13 @@
|
|
|
32432
32457
|
isHorizontal = this._isHorizontal,
|
|
32433
32458
|
pos = this.calculatePosByValue(value, position),
|
|
32434
32459
|
textSpace = null !== (_a = handlerText.space) && void 0 !== _a ? _a : 4,
|
|
32460
|
+
handlerTextStyle = this._getHandlerTextStyle(value, position),
|
|
32435
32461
|
textStyle = {
|
|
32436
32462
|
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_b = handlerText.precision) && void 0 !== _b ? _b : 0),
|
|
32437
|
-
lineHeight: null
|
|
32463
|
+
lineHeight: null == handlerTextStyle ? void 0 : handlerTextStyle.lineHeight,
|
|
32438
32464
|
cursor: !1 === slidable ? "default" : getDefaultCursor(isHorizontal)
|
|
32439
32465
|
};
|
|
32440
|
-
isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = pos) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = pos);
|
|
32441
|
-
return graphicCreator.text(Object.assign(Object.assign({}, textStyle), handlerText.style));
|
|
32466
|
+
return isHorizontal ? "top" === align ? (textStyle.textBaseline = "bottom", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight - handlerSize) / 2 - textSpace) : (textStyle.textBaseline = "top", textStyle.textAlign = "center", textStyle.x = pos, textStyle.y = (railHeight + handlerSize) / 2 + textSpace) : "left" === align ? (textStyle.textBaseline = "middle", textStyle.textAlign = "end", textStyle.x = (railWidth - handlerSize) / 2 - textSpace, textStyle.y = pos) : (textStyle.textBaseline = "middle", textStyle.textAlign = "start", textStyle.x = (railWidth + handlerSize) / 2 + textSpace, textStyle.y = pos), Object.assign(Object.assign({}, textStyle), handlerTextStyle);
|
|
32442
32467
|
}
|
|
32443
32468
|
_renderTooltip() {
|
|
32444
32469
|
var _a;
|
|
@@ -32566,31 +32591,19 @@
|
|
|
32566
32591
|
}
|
|
32567
32592
|
}
|
|
32568
32593
|
_updateHandler(handler, position, value) {
|
|
32569
|
-
var _a;
|
|
32570
32594
|
const isHorizontal = this._isHorizontal;
|
|
32571
32595
|
handler.setAttribute(isHorizontal ? "x" : "y", position);
|
|
32572
32596
|
const updateHandlerText = handler.name === SLIDER_ELEMENT_NAME.startHandler ? this._startHandlerText : this._endHandlerText;
|
|
32573
32597
|
if (updateHandlerText) {
|
|
32574
|
-
const
|
|
32575
|
-
|
|
32576
|
-
} = this.attribute;
|
|
32577
|
-
updateHandlerText.setAttributes({
|
|
32578
|
-
text: handlerText.formatter ? handlerText.formatter(value) : value.toFixed(null !== (_a = handlerText.precision) && void 0 !== _a ? _a : 0),
|
|
32579
|
-
[isHorizontal ? "x" : "y"]: position
|
|
32580
|
-
});
|
|
32598
|
+
const handlerPosition = this._getHandlerPosition(handler.name === SLIDER_ELEMENT_NAME.startHandler);
|
|
32599
|
+
updateHandlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
32581
32600
|
}
|
|
32582
32601
|
handler.name === SLIDER_ELEMENT_NAME.startHandler ? (this._currentValue.startValue = value, this._currentValue.startPos = position) : (this._currentValue.endValue = value, this._currentValue.endPos = position);
|
|
32583
32602
|
}
|
|
32584
32603
|
_updateHandlerText(handlerText, position, value) {
|
|
32585
|
-
var _a;
|
|
32586
32604
|
const isHorizontal = this._isHorizontal,
|
|
32587
|
-
|
|
32588
|
-
|
|
32589
|
-
} = this.attribute;
|
|
32590
|
-
handlerText.setAttributes({
|
|
32591
|
-
[isHorizontal ? "x" : "y"]: position,
|
|
32592
|
-
text: handlerTextAttr.formatter ? handlerTextAttr.formatter(value) : value.toFixed(null !== (_a = handlerTextAttr.precision) && void 0 !== _a ? _a : 0)
|
|
32593
|
-
});
|
|
32605
|
+
handlerPosition = this._getHandlerPosition(handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText);
|
|
32606
|
+
handlerText.setAttributes(this._getHandlerTextAttributes(value, handlerPosition));
|
|
32594
32607
|
const updateHandler = handlerText.name === SLIDER_ELEMENT_NAME.startHandlerText ? this._startHandler : this._endHandler;
|
|
32595
32608
|
updateHandler && updateHandler.setAttributes({
|
|
32596
32609
|
[isHorizontal ? "x" : "y"]: position
|
|
@@ -57017,7 +57030,7 @@
|
|
|
57017
57030
|
}
|
|
57018
57031
|
constructor(container, options = {}) {
|
|
57019
57032
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
|
|
57020
|
-
if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.25.1-alpha.
|
|
57033
|
+
if (super(), this.showFrozenIcon = !0, this._scrollToRowCorrectTimer = null, this._tableBorderWidth_left = 0, this._tableBorderWidth_right = 0, this._tableBorderWidth_top = 0, this._tableBorderWidth_bottom = 0, this.version = "1.25.1-alpha.1", this.id = `VTable${Date.now()}`, this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = throttle2(this.render.bind(this), 200), "undefined" != typeof window) {
|
|
57021
57034
|
const g = window;
|
|
57022
57035
|
g[this.id] = this;
|
|
57023
57036
|
const registry = g.__vtable__ || (g.__vtable__ = {
|