Coder Social home page Coder Social logo

Readonly mode about vsm-box HOT 5 OPEN

vsm avatar vsm commented on June 11, 2024
Readonly mode

from vsm-box.

Comments (5)

stcruy avatar stcruy commented on June 11, 2024 1

Here is a quick fix, perhaps: you could add a listener to your vsm-box, and when it emits a change event, just set the original initialValue back onto the vsm-box. That should make it clear to the user that you do not want them to use the editing function! A bit as in youtu.be/Nqk_nWAjBus. ^-^ (and check that the change doesn't echo back what you just put in!)

from vsm-box.

carlosvega avatar carlosvega commented on June 11, 2024 1

For now I will be preventing the events of some parts with css pointer-events: none; but I wonder if there is any way to customize the contextual menu of the terms to remove the options remove/edit/insert . Thanks for the support!

from vsm-box.

stcruy avatar stcruy commented on June 11, 2024

Thank you for acknowledging my work of writing solid documentation! That is really nice to hear! 😊

This 'readonly' feature is on the to-do list, indeed. But at the moment I have to prioritize more urgent tasks.

After developing the many core components of VSM, I'm now focusing for a while on demonstrating VSM's usefulness in many application areas. This will be essential to secure stable funding and to develop more nice-to-have features.

from vsm-box.

stcruy avatar stcruy commented on June 11, 2024

Ha, that's a clever fix! : )
Could you add the list of CSS-overrides that work for you here, once you find them? It might help others.

For the contextual menus maybe the same approach does it... Have you tried setting display: none; on the .menu class (or some more specific selector) in ThePopup component?


Edit (Apr 2021): however, note that also in a readonly mode, the connector-highlighters should still appear when mousing over connectors. Because this helps users to see clearly which terms are connected by connectors that span longer distances.

from vsm-box.

carlosvega avatar carlosvega commented on June 11, 2024

Yes, that's my fallback solution :-) display:none for those options but I was hoping for a exclude list of the options. Fair enough. In the end I might go for pointer-events: none for the whole vsm-box since I can't avoid the user from double clicking the term box and show the input box. I will be losing the contextual menu because hover event won't be trigger but I couldn't find a better solution (i.e. disable connectors, double click and only keep the contextual menu).

As a mini-request, perhaps the vsm-box events should respond to preventDefault. This way developers could intercept all events and disable them one by one as needed.

from vsm-box.

Related Issues (3)

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.