Commit d28e1782 authored by Vasily Belolapotkov's avatar Vasily Belolapotkov

fix preview window min width

parent 6bd4bf2a
......@@ -118,7 +118,6 @@ export const makePlotsInspector: ChartComponentFactory<
} = stateController.getState();
const xOffsetValue = xTotalRange.start + xOffset * xTotalRange.distance;
// TODO: consider moving formula into utils
inspectorXCoordinate =
((inspectorValues.xValue - xOffsetValue) * xCoordsScale) / xScale;
}
......@@ -134,7 +133,6 @@ export const makePlotsInspector: ChartComponentFactory<
function getSvgPointAttributes(yValue: IInspectorValue): IAttributesMap {
const { yOffset, yScale } = stateController.getState();
// TODO: consider moving formula into utils
const yCoordinate = ((yValue.value - yOffset) * yCoordsScale) / yScale;
return {
cx: `${inspectorXCoordinate}`,
......
......@@ -14,6 +14,7 @@ export const makePreviewWindow: ChartComponentFactory<ISize> = function(
chartStateController,
) {
const stateController = chartStateController;
const minWidth = 60;
let width: number;
let height: number;
......@@ -184,7 +185,6 @@ export const makePreviewWindow: ChartComponentFactory<ISize> = function(
offsetWidth: resizeWindowWidth,
} = resizeWindow;
const minWidth = 10;
if (offsetX + minWidth >= resizeWindowWidth) {
return;
}
......@@ -213,7 +213,7 @@ export const makePreviewWindow: ChartComponentFactory<ISize> = function(
const offsetRight = totalWidth - (resizeWindowLeft + resizeWindowWidth);
const newRight = offsetRight - offsetX;
if (resizeWindowLeft + newRight >= totalWidth) {
if (resizeWindowLeft + newRight + minWidth >= totalWidth) {
return;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment