MCPcopy
hub / github.com/clauderic/dnd-kit / constructor

Method constructor

packages/dom/src/core/plugins/feedback/Feedback.ts:89–108  ·  view source on GitHub ↗
(manager: DragDropManager, options?: FeedbackOptions)

Source from the content-addressed store, hash-verified

87 };
88
89 constructor(manager: DragDropManager, options?: FeedbackOptions) {
90 super(manager, options);
91
92 const styleInjector = manager.registry.plugins.get(StyleInjector as any) as
93 | StyleInjector
94 | undefined;
95
96 const unregisterStyles = styleInjector?.register(CSS_RULES);
97
98 if (unregisterStyles) {
99 const originalDestroy = this.destroy.bind(this);
100 this.destroy = () => {
101 unregisterStyles();
102 originalDestroy();
103 };
104 }
105
106 this.registerEffect(this.#trackOverlayRoot.bind(this, styleInjector));
107 this.registerEffect(this.#render);
108 }
109
110 #trackOverlayRoot(styleInjector: StyleInjector | undefined) {
111 const {overlay} = this;

Callers

nothing calls this directly

Calls 3

registerMethod · 0.65
getMethod · 0.45
bindMethod · 0.45

Tested by

no test coverage detected