Skip to content

Commit

Permalink
Pull request #5384: [DXCF-5653] Change the upper boarder line color f…
Browse files Browse the repository at this point in the history
…or indicators pane // fixed color and height for paneResizer

Merge in DXCHARTS/dxchart5 from feature/DXCF-5653-change-the-upper-boarder-line-color-for-indicators-pane to master

* commit 'd64ad9bfa31fb9af2c1e0920f9d64779f5689350':
  [DXCF-5653] Change the upper boarder line color for indicators pane // code style fix
  [DXCF-5653] Change the upper boarder line color for indicators pane // cursor for resizer, variable for magic number, and jsdocs fix
  [DXCF-5653] Change the upper boarder line color for indicators pane // drag zone fix and revert of hover line height
  [DXCF-5653] Change the upper boarder line color for indicators pane // size fix
  [DXCF-5653] Change the upper boarder line color for indicators pane // fixed color and height for paneResizer

GitOrigin-RevId: 6de1fcfbba1243f0b6fada3a2386cd1b9d29f71d
  • Loading branch information
artskar authored and dxcity committed Jan 13, 2025
1 parent 866771c commit 9a26a03
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/chart/canvas/canvas-bounds-container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -764,10 +764,10 @@ export class CanvasBoundsContainer {
/**
* Gets hit-test fn for canvas element.
* @param {string} el - CanvasElement.ELEMENT_NAME
* @param {boolean} reverse - reverses the hit test condition
* @param {number} extensionX - extended hitBoundsTest in horizontal direction
* @param {number} extensionY - extended hitBoundsTest in vertical direction
* @param wholePage
* @param {Object} options - An object containing options for the hit test.
* @param {number} [options.extensionX=0] - The amount of extension in the x-axis.
* @param {number} [options.extensionY=0] - The amount of extension in the y-axis.
* @param {boolean} [options.wholePage=false] - Whether to test against the whole page or just the bounds object.
* @return {HitBoundsTest} hit-test fn
*/
getBoundsHitTest(el: string, options: AtLeastOne<HitBoundsTestOptions> = DEFAULT_HIT_TEST_OPTIONS): HitBoundsTest {
Expand Down
2 changes: 1 addition & 1 deletion src/chart/chart.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ export const getDefaultConfig = (): FullChartConfig => ({
highLowTheme: { highColor: 'rgba(223,222,223,1)', lowColor: 'rgba(223,222,223,1)' },
instrumentInfo: { textColor: '#aeb1b3' },
paneResizer: {
lineColor: 'rgba(55,55,54,1)',
lineColor: 'rgba(61,61,61,1)',
bgColor: 'rgba(20,20,19,1)',
bgHoverColor: 'rgba(55,55,54,0.6)',
},
Expand Down
6 changes: 3 additions & 3 deletions src/chart/components/pane/pane-manager.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { uuid as generateUuid } from '../../utils/uuid.utils';
import { ChartBaseModel } from '../chart/chart-base.model';
import { createHighLowOffsetCalculator } from '../chart/data-series.high-low-provider';
import { ChartPanComponent } from '../pan/chart-pan.component';
import { BarResizerComponent } from '../resizer/bar-resizer.component';
import { BarResizerComponent, RESIZER_HIT_TEST_EXTENSION } from '../resizer/bar-resizer.component';
import {
YExtentComponent,
YExtentCreationOptions,
Expand Down Expand Up @@ -97,7 +97,7 @@ export class PaneManager extends ChartBaseElement {
*/
private addResizer(uuid: string) {
const resizerHT = this.canvasBoundsContainer.getBoundsHitTest(CanvasElement.PANE_UUID_RESIZER(uuid), {
extensionY: this.config.components.paneResizer.dragZone,
extensionY: this.config.components.paneResizer.dragZone + RESIZER_HIT_TEST_EXTENSION,
});
const dragPredicate = () => this.chartBaseModel.mainVisualPoints.length !== 0;
const dragTick = () => {
Expand Down Expand Up @@ -335,7 +335,7 @@ export class PaneManager extends ChartBaseElement {
this.cursorHandler.setCursorForCanvasEl(
paneResizer,
this.config.components.paneResizer.cursor,
this.config.components.paneResizer.dragZone,
this.config.components.paneResizer.dragZone + RESIZER_HIT_TEST_EXTENSION,
);

return () => {
Expand Down
2 changes: 2 additions & 0 deletions src/chart/components/resizer/bar-resizer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import { BarResizerDrawer } from './bar-resizer.drawer';
import { BoundsProvider } from '../../model/bounds.model';
import { HitTestCanvasModel } from '../../model/hit-test-canvas.model';

export const RESIZER_HIT_TEST_EXTENSION: number = 8;

/**
* Bar separator between panes.
* Used to resize the areas height or just draw a fixed line.
Expand Down

0 comments on commit 9a26a03

Please sign in to comment.