Comments (5)
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.
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.
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vsm-box.