tvcharts 0.8.67 → 0.8.69
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.
|
@@ -146,7 +146,7 @@ var TooltipHTMLContent = /** @class */function () {
|
|
|
146
146
|
title = formatAmount(totalSize_1) + " @ " + (totalPrice_1 / orders.length).toFixed(precision) + " avg price";
|
|
147
147
|
}
|
|
148
148
|
var primaryColor = isUp ? "--primary-color" : "--color-kl-red";
|
|
149
|
-
el.innerHTML = "<div style=\"padding-left: 4px;border-left: 4px solid var(" + primaryColor + ");width: 290px;z-index: 10;border-radius: 6px;background: var(--container-bg);box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px 0px;color: var(--title-color);\">\n <div style=\"padding: 16px 12px;\"><div style=\"display: flex; align-items: center; margin-bottom: 12px;\">\n <div style=\"height: 20px; border-radius: 50px; min-width: 20px; margin-right: 8px; text-align: center; background-color: var(" + primaryColor + "); font-size: 12px; color: #fff;line-height:20px;\">" + orders.length + "</div>\n <div style=\"font-weight: 600; font-size: 18px;\"
|
|
149
|
+
el.innerHTML = "<div style=\"padding-left: 4px;border-left: 4px solid var(" + primaryColor + ");width: 290px;z-index: 10;border-radius: 6px;background: var(--container-bg);box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px 0px;color: var(--title-color);\">\n <div style=\"padding: 16px 12px;\"><div style=\"display: flex; align-items: center; margin-bottom: 12px;\">\n <div style=\"height: 20px; border-radius: 50px; min-width: 20px; margin-right: 8px; text-align: center; background-color: var(" + primaryColor + "); font-size: 12px; color: #fff;line-height:20px;\">" + orders.length + "</div>\n <div style=\"font-weight: 600; font-size: 18px;\">" + (isUp ? '买入' : '卖出') + "</div></div><div style=\"font-size: 13px; margin-bottom: 12px;\">" + title + "</div>\n " + ordersHtml + "\n </div>\n </div>\n ";
|
|
150
150
|
console.log("====", el.clientHeight, el.clientWidth);
|
|
151
151
|
if (x + el.clientWidth > this._container.clientWidth) {
|
|
152
152
|
style.left = x - el.clientWidth - margin + 'px';
|
|
@@ -69,7 +69,7 @@ var PlaybackOrderView = /** @class */function (_super) {
|
|
|
69
69
|
this._renderHover();
|
|
70
70
|
if (!this.htmlContent) {
|
|
71
71
|
this.htmlContent = new PlaybackHtmlContent(api);
|
|
72
|
-
api.getZr().on('
|
|
72
|
+
api.getZr().on('mousedown', this._clickGlobal, this);
|
|
73
73
|
}
|
|
74
74
|
var clipPath = seriesModel.get('clip', true) && createClipPath(seriesModel.coordinateSystem, false, seriesModel);
|
|
75
75
|
if (clipPath) {
|
|
@@ -149,6 +149,13 @@ var PlaybackOrderView = /** @class */function (_super) {
|
|
|
149
149
|
// PENDING make `0.1` configurable, for example, `clipTolerance`?
|
|
150
150
|
return coordSys && coordSys.getArea && coordSys.getArea(.1);
|
|
151
151
|
};
|
|
152
|
+
PlaybackOrderView.prototype._mouseDown = function (e) {
|
|
153
|
+
var obj = inner(e.target);
|
|
154
|
+
if (!obj) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
e.cancelBubble = true;
|
|
158
|
+
};
|
|
152
159
|
PlaybackOrderView.prototype._mouseClick = function (e) {
|
|
153
160
|
var obj = inner(e.target);
|
|
154
161
|
if (!obj) {
|
|
@@ -217,6 +224,7 @@ var PlaybackOrderView = /** @class */function (_super) {
|
|
|
217
224
|
this.group.on('mouseover', this._mouseover, this);
|
|
218
225
|
this.group.on('mouseout', this._mouseout, this);
|
|
219
226
|
this.group.on('click', this._mouseClick, this);
|
|
227
|
+
this.group.on('mousedown', this._mouseDown, this);
|
|
220
228
|
} else {
|
|
221
229
|
this._symbolGroup.removeAll();
|
|
222
230
|
}
|
|
@@ -292,7 +300,7 @@ var PlaybackOrderView = /** @class */function (_super) {
|
|
|
292
300
|
PlaybackOrderView.prototype.dispose = function (ecModel, api) {
|
|
293
301
|
this.remove(ecModel, api);
|
|
294
302
|
this.htmlContent.dispose();
|
|
295
|
-
api.getZr().off('
|
|
303
|
+
api.getZr().off('mousedown', this._clickGlobal);
|
|
296
304
|
this.htmlContent = null;
|
|
297
305
|
// this._lineGroup.removeAll();
|
|
298
306
|
};
|
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ declare class PlaybackOrderView extends ChartView {
|
|
|
16
16
|
_renderHover(): void;
|
|
17
17
|
_clickGlobal(): void;
|
|
18
18
|
_getClipShape(seriesModel: PlaybackOrderSeriesModel): import("../../coord/CoordinateSystem").CoordinateSystemClipArea;
|
|
19
|
+
_mouseDown(e: any): void;
|
|
19
20
|
_mouseClick(e: any): void;
|
|
20
21
|
_mouseover(e: any): void;
|
|
21
22
|
_mouseout(): void;
|