Comments (4)
The problem with this approach is that hashmap keys don't have a guaranteed order, which means that this code is most probably missing the textHash / cache most often than not.
The order is indeed not guaranteed.
In my experience, browsers return the same string for the same object instance (and for objects whose properties were created in the same order - which is JointJS case).
So even though in theory there are inaccuracies, in practice it works well enough. This caching should prevent the same text from being rendered on every update. And I do believe it does.
Do you have any example where the cache is missed?
from joint.
Looking at the code, it would be relatively easy to store the text attributes one by one in a variable instead of using the util.pick
method. I'm just trying to guess how critical this problem is.
from joint.
Hey! It's not critical at all. In fact, worst case scenario the cache will be missed and the text will be rerendered. I can't create a demo that will reproduce the bug. It did happened to me a couple of times (in the span of a week), but it's very random.
from joint.
Fixed in #2333.
from joint.
Related Issues (20)
- [Bug]: The padding of PaperScroller's "scrollWhileDragging" is measuring incorrectly the position of the cursor (part 2) HOT 2
- [Docs]: Stencil height inconsistency HOT 4
- [Bug]: Grid layout dx / dy incorrect default values HOT 2
- [Bug]: Safari doesn't render link arrow markers after loading data HOT 10
- [Bug]: Can't prevent default on "blank:contextmenu" event HOT 2
- [Bug]: HOT 6
- [Bug]: The direction of the source and target points cannot always run along the center, but will run to the edge HOT 5
- [Bug]: RegEx for breakText and textWrap opt.hyphen does not include international characters HOT 1
- [Bug]: Custom events do not trigger HOT 2
- [Bug]: Using graph.findModelsUnderElement(cell) with lables positioned outside the rectangle cell
- [Bug]:Jointjs+ Navigator
- Issue with JointJS in Typescript when integrated in own project
- [Bug]: Ports positioning in jointJS with angular HOT 1
- Vectorizer: can not convert zero-length arc to curve HOT 1
- [Bug]: Angular 17, Builder Application or Esbuild, does not provide an export named "dia" HOT 2
- SVG's height is overlapped by uikit.js HOT 3
- type(ui.Toolbar): wrong `widgetNamespace` type HOT 1
- jointjs+ in angular project v8.2.14 HOT 2
- [Bug]: Migration to joinjts 4.0 Not loading cells HOT 10
- Stencil Label not rendering HOT 1
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 joint.