question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

getMinModel() should return diff between current and initial models, not between current and default models

See original GitHub issue

URL 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:closed
  • Created 7 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jheeffercommented, Oct 27, 2016

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.

var page_model = {
    ...
}

var url_model = decodeURIComponent(location.hash)

var init_model = Vizabi.utils.deepExtend(config, url_model);

var viz = Vizabi('bubbleChart', init_model);

viz.on('persistentChange', function() {
    location.hash = encodeURIComponent(viz.getPersistentMinimalModel(page_model));
})

!this means tools page code needs updating when merging this!

0reactions
jheeffercommented, Oct 27, 2016

@angieskazka when merging make sure to update tools page

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the difference between current and default sliders?
Default is what the game shipped with. Current is if you've downloaded any other rosters and have them currently loaded at the time...
Read more >
Docstrings · Nonconvex.jl - JuliaHub
The objective function of the augmented Lagrangian model, model . The following are its fields: model : the original model optimized; x :...
Read more >
I am trying to get all updated value in a model and send an ...
Okay, so this is one way to solve your problem of detecting the "changed fields" and autosending the email: Here's how it works....
Read more >
modelsummary: regression tables with side-by-side models
The output argument determines the type of object returned by modelsummary and/or the file where this table should be written.
Read more >
You need to allow LIVE rosters to be used at beginning of MTO
I'm going to use Julio Rodriguez as the perfect example of why this needs to change. Default rosters have his speed in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found