Open backnotprop opened 1 year ago
@backnotprop, I have the same problem with config. Can you please specify exactly which files you are changing? Did this help to solve the problem?
@DenisovKirill
Kepler v3.0.0-alpha.0
node_modules/@kepler.gl/layers/dist/scenegraph-layer/scenegraph-layer.js
// ~ line 100
var scenegraphVisConfigs = {
opacity: 'opacity',
colorRange: 'colorRange',
scenegraph: 'scenegraph', // <------ added this
sizeScale: 'sizeScale',
// angleX: ...
}
node_modules/@kepler.gl/layers/dist/base-layer.js
// ~550-570 (if block in registerVisConfig)
if (typeof configItem === 'string' && _constants.LAYER_VIS_CONFIGS[configItem]) {
// ...
} else if ((0, _typeof2["default"])(configItem) === 'object' && ['type', 'defaultValue'].every(function (p) { return configItem.hasOwnProperty(p); })) {
// ...
} else if(configItem === "scenegraph") { // <------ added this additional else if
_this3.config.visConfig[item] = "scenegraph";
}
Describe the bug Scenegraphs dont load from saved config
Scenegraph needs to be added to
scenegraphVisConfigs
in classscenegraph-layer
and in classbase-layer
you all need to either add supportedLAYER_VIS_CONFIGS
for scenegraph (if possible in the wild west of abstractions), or create an additional else if statement supporting special case scenegraph.To Reproduce I explained your code above. To fix*, fix your typescript files:
My lazy fix... I hacked the npm module files by modifying scenegraph-layer:
and in base layer
Expected behavior Custom scenegraphs can be saved in config, and loaded again (duck is only so cute for a little while)