Git Product home page Git Product logo

Comments (7)

samelawrence avatar samelawrence commented on May 13, 2024

@alesviti Even when you select another node? For me, that solves the issue and moves all the elements involved.

from my-mind.

alesviti avatar alesviti commented on May 13, 2024

Yes. I meant while still editing. After moving away (or Enter) it moves OK.
I need to be more specific :-)

from my-mind.

samelawrence avatar samelawrence commented on May 13, 2024

@alesviti I would guess that the check for that occurs on node.select - if you want to change it to constantly check, or check on keyup, that would fix it. I would suggest the keyup method. @ondras your thoughts?

from my-mind.

ondras avatar ondras commented on May 13, 2024

I honestly see no real point in "fixing" this, but if that is what users want... can be done, naturally.

The node's value remains unchanged until you confirm that you are finished editing, either by hitting Enter or clicking another node. Only after this confirmation the node really changes its value and the relevant subtree gets redrawn.

This is the reason why nothing happens during editing: the re-layouting and re-drawing can be expensive and I wanted to prevent this being done too frequently (i.e. every time the value changes by pressing a key or so).

from my-mind.

samelawrence avatar samelawrence commented on May 13, 2024

@ondras I'm guessing this really only becomes computationally expensive when your total node count rises above a certain number? What if instead of checking on every keyup, there was a timer event that checked? This also seems like a more expensive option, but I'm just shooting ideas here.

My real suggestion is this: To avoid text overlay, when editing a node, use CSS to style that selected node to have a "background" color that is 100% opaque and overlays anything behind / under it. The node should also "grow" in size as text is entered. Think about how Excel / Numbers allows you to type text into a cell that will expand over all neighbor cells, and then on confirm will re-size everything to properly align.

from my-mind.

ondras avatar ondras commented on May 13, 2024

@samelawrence Perhaps I was just too afraid to re-layout stuff too frequently. I will perform some tests and adjust the feature as necessary.

from my-mind.

samelawrence avatar samelawrence commented on May 13, 2024

@ondras Right. Using my suggestion doesn't force any re-layout until confirmation. It just avoids text overlay.

from my-mind.

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.