MCPcopy
hub / github.com/plotly/plotly.js / handleDefaults

Function handleDefaults

src/plots/map/layout_defaults.js:19–47  ·  view source on GitHub ↗
(containerIn, containerOut, coerce)

Source from the content-addressed store, hash-verified

17};
18
19function handleDefaults(containerIn, containerOut, coerce) {
20 coerce('style');
21 coerce('center.lon');
22 coerce('center.lat');
23 coerce('zoom');
24 coerce('bearing');
25 coerce('pitch');
26
27 var west = coerce('bounds.west');
28 var east = coerce('bounds.east');
29 var south = coerce('bounds.south');
30 var north = coerce('bounds.north');
31 if(
32 west === undefined ||
33 east === undefined ||
34 south === undefined ||
35 north === undefined
36 ) {
37 delete containerOut.bounds;
38 }
39
40 handleArrayContainerDefaults(containerIn, containerOut, {
41 name: 'layers',
42 handleItemDefaults: handleLayerDefaults
43 });
44
45 // copy ref to input container to update 'center' and 'zoom' on map move
46 containerOut._input = containerIn;
47}
48
49function handleLayerDefaults(layerIn, layerOut) {
50 function coerce(attr, dflt) {

Callers 4

supplyFunction · 0.50
colorscale_test.jsFile · 0.50

Calls 1

coerceFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…