Skip to content

Commit 7848a0e

Browse files
authored
fix: sync shaded area with current spot barrier (#1482)
1 parent 5dcc234 commit 7848a0e

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: sass/components/_barrier.scss

-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@
205205
right: 0;
206206
height: 120px !important;
207207
opacity: 0.3;
208-
transition: all 0.1s ease-out;
209208
}
210209

211210
/* css gradients are only partially supported in Safari, but will work here since colors are not premultiplied */

Diff for: src/store/BarrierStore.ts

+5
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ export default class BarrierStore {
113113
() => [this.mainStore.chartAdapter.epochBounds, this.mainStore.chartAdapter.quoteBounds],
114114
this._drawShadedArea
115115
);
116+
117+
this.mainStore.chartAdapter.painter.registerCallback(this._drawShadedArea);
116118
};
117119

118120
init(): void {
@@ -195,6 +197,9 @@ export default class BarrierStore {
195197

196198
this.disposeDrawReaction?.();
197199

200+
this.mainStore.chartAdapter.painter.unregisterCallback(this._drawShadedArea);
201+
202+
198203
const i = this.mainStore.chart._barriers.findIndex((b: BarrierStore) => b === this);
199204
if (i !== -1) {
200205
this.mainStore.chart._barriers.splice(i, 1);

0 commit comments

Comments
 (0)