GithubHelp home page GithubHelp logo

Comments (3)

kmaork avatar kmaork commented on May 8, 2024

@rkishony right now we don't assign two quibs from graphics when one of them depends on the other, but only to the source quib, to prevent contradictory changes to a quib.

But in cases like your example, I guess that we should not view overriding as a contradictory change.

My new approach would be to collect the overrides that will be caused by assignment made by the graphics event, and discard assignments just when they cause an override in the same quib.

The problem with that approach is that to know what overrides we might perform, we might have to ask the user to choose, which would be weird to do when some of these overrides will not be performed.

An example where this is relevant:

a = iquib(1)
b = a + 1
c = a + 2
b.allow_overriding = True
c.allow_overriding = True
plot(b, c)

Whet the plot is dragged, I'd the user chooses to override both b and c at the iquib level, their assignments will be contradictory and we will have to choose only one.

Maybe as a very nice-to-have feature in the future, if the user chooses to override the first at the iquib level, we could change the dialog for c to offer only self override or skipping. But for now I think the approach I offered is good enough.

from quibbler.

rkishony avatar rkishony commented on May 8, 2024

ok, but it will help if in addition you also make sure that the plot quib does not issue an override in the X position if the marker was dragged only on Y (if X didn't change) and does not issue an override in the Y position if the marker was dragged horizontally

this will allow more logical dragging along constrained curves such as in the plot(b,c) example you have

from quibbler.

kmaork avatar kmaork commented on May 8, 2024

I'm not sure that we should do that. If we override only one axis when the diff is in the other axis, the change might still propagate through the quibs into the "unchanged" axis, and the dot we dragged will end up in a different position from the mouse. I think when dragging a point, we logically assign to it both x and y, regardless of its previous location.

from quibbler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.