@gravity-ui/graph
Version:
Modern graph editor component
30 lines (29 loc) • 739 B
JavaScript
import { GraphComponent } from "../../GraphComponent";
export class DrawBelow extends GraphComponent {
constructor() {
super(...arguments);
this.shouldUpdateChildren = false;
this.shouldRenderChildren = false;
}
isVisible() {
return true;
}
render() {
this.context.ctx.globalCompositeOperation = "destination-over";
return;
}
}
export class DrawOver extends GraphComponent {
constructor() {
super(...arguments);
this.shouldUpdateChildren = false;
this.shouldRenderChildren = false;
}
isVisible() {
return true;
}
render() {
this.context.ctx.globalCompositeOperation = "source-over";
return;
}
}