acttrader-charts 1.3.0-beta.7 → 1.3.0-beta.8
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/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/webview/chart.html +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2651,8 +2651,8 @@ function drawLevel(ctx, level, layout, chartW, colors, theme, precision, hovered
|
|
|
2651
2651
|
ctx.save();
|
|
2652
2652
|
ctx.font = FONT_BRACKET;
|
|
2653
2653
|
const closeSlot = hideConfirmCancel ? 0 : closeR * 2 + BRACKET_BOX_PAD_X / 2;
|
|
2654
|
-
const slBW = BRACKET_BOX_PAD_X + ctx.measureText(bracketBoxLabel("stopLoss", slRenderPrice, precision, level, bracketLabel, draggingLabel === slDragKey)).width + BRACKET_BOX_PAD_X + closeSlot;
|
|
2655
|
-
const tpBW = BRACKET_BOX_PAD_X + ctx.measureText(bracketBoxLabel("takeProfit", tpRenderPrice, precision, level, bracketLabel, draggingLabel === tpDragKey)).width + BRACKET_BOX_PAD_X + closeSlot;
|
|
2654
|
+
const slBW = BRACKET_BOX_PAD_X + ctx.measureText(bracketBoxLabel("stopLoss", slRenderPrice, precision, level, bracketLabel, draggingLabel === slDragKey && !draftBracketPnl?.sl)).width + BRACKET_BOX_PAD_X + closeSlot;
|
|
2655
|
+
const tpBW = BRACKET_BOX_PAD_X + ctx.measureText(bracketBoxLabel("takeProfit", tpRenderPrice, precision, level, bracketLabel, draggingLabel === tpDragKey && !draftBracketPnl?.tp)).width + BRACKET_BOX_PAD_X + closeSlot;
|
|
2656
2656
|
ctx.restore();
|
|
2657
2657
|
const slBLineX = bracketLineXMap.get(slDragKey) ?? chartW * BRACKET_BASE_RATIO;
|
|
2658
2658
|
const tpBLineX = bracketLineXMap.get(tpDragKey) ?? chartW * BRACKET_BASE_RATIO;
|
|
@@ -3092,7 +3092,8 @@ function drawBracketLine(ctx, level, bracketType, bracketPrice, scale, priceRang
|
|
|
3092
3092
|
ctx.lineTo(chartW, y);
|
|
3093
3093
|
ctx.stroke();
|
|
3094
3094
|
ctx.globalAlpha = 1;
|
|
3095
|
-
const
|
|
3095
|
+
const showComputedPnl = isDraggingThis && !pnlText;
|
|
3096
|
+
const boxLabel = bracketBoxLabel(bracketType, price, precision, level, bracketLabel, showComputedPnl);
|
|
3096
3097
|
ctx.font = FONT_BRACKET;
|
|
3097
3098
|
const textW = ctx.measureText(boxLabel).width;
|
|
3098
3099
|
const pnlW = pnlText ? ctx.measureText(pnlText).width + BRACKET_BOX_PAD_X : 0;
|