MCPcopy
hub / github.com/visgl/deck.gl / updateHTML

Method updateHTML

modules/widgets/src/splitter-widget.tsx:210–222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208 // In this case we need the widget UI to synchronize with deck view states
209 // so we update deck props here and rerender DOM in the next onRedraw
210 updateHTML() {
211 if (!this.views) {
212 // viewLayouts has changed, re-evaluate
213 this.views = evaluateViews(this.viewLayouts[0]) as ViewsT;
214 // we send a copy to the callback so that externally set views can be differentiated from internal
215 this.props.onChange(this.views.slice() as ViewsT);
216 }
217 // This method is called inside deck.setProps > widgetManager.setProps > widget.setProps
218 // Calling deck.setProps immediately would cause infinite loop
219 requestAnimationFrame(() => {
220 this.doUpdate();
221 });
222 }
223
224 private doUpdate() {
225 if (this.deck) {

Callers 15

setPropsFunction · 0.80
_addWidgetMethod · 0.80
onRedrawMethod · 0.80
onFullscreenChangeMethod · 0.80
ToggleWidgetClass · 0.80
onViewportChangeMethod · 0.80
_setIsOpenMethod · 0.80
onRedrawMethod · 0.80
TimelineWidgetClass · 0.80
playMethod · 0.80
stopMethod · 0.80

Calls 3

doUpdateMethod · 0.95
evaluateViewsFunction · 0.85
onChangeMethod · 0.80

Tested by

no test coverage detected