getMinModel() should return diff between current and initial models, not between current and default models
See original GitHub issueURL problem 1: https://github.com/vizabi/vizabi/issues/1338
URL problem 2: consider the following situation:
default model would have a certain config: color is constant page would overwrite that config: color now be world regions user would change color to constant refresh page: color is world regions!
why? because when user sets color=constant this is equal to model defaults and is not returned by getMinModel()
for the discussion: let’s define operation “+" as deep-extend (leaves are replaced) let’s define operation “–" as diff between two models
model config + tool config = default model
default model + page config = initial model
initial model + user actions = current model
now we have:
page config – (current model – default model) = url model
we should have:
current model – initial model = url model
i took this expression
page config – (current model – default model) = url model
inserted “initial model” instead “default model”
decoded all elements from definitions above
opened brackets like in math
and i got… – user actions = url model
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (7 by maintainers)

Top Related StackOverflow Question
Okay, I added commit https://github.com/vizabi/vizabi/commit/fdfba2f4aa8a12f7896ba6cdcb1ed477b4c88345
What do you think @dab2000 ?
This is now the code of external page needed for URL persistence. It could be even smaller, but I think then Vizabi would start to know what happens outside it.
!this means tools page code needs updating when merging this!
@angieskazka when merging make sure to update tools page