Skip to content

Sync latest changes from source repo#1

Open
naveenkumarganesan wants to merge 24 commits into
TuvaLabs:devfrom
DmitryBaranovskiy:master
Open

Sync latest changes from source repo#1
naveenkumarganesan wants to merge 24 commits into
TuvaLabs:devfrom
DmitryBaranovskiy:master

Conversation

@naveenkumarganesan

Copy link
Copy Markdown

No description provided.

by99 and others added 24 commits November 12, 2015 21:30
Without this change, it is very easy for an application to slowly leak memory as Raphael continues to add new keys to `eldata`.

This memory leak turns out to be a problem for [Piwik](https://piwik.org/), which uses
kartographer.js (which uses raphael) to draw an SVG image of the United States
in its analytics dashboard ([see demo](https://demo.piwik.org/index.php?module=CoreHome&action=index&idSite=3&period=day&date=yesterday)).

Every time the dashboard is redrawn, it spawns ~700 new Elements with data. [I've submitted a pull request that appropriately cleans up this data when the user navigates away from the page using `removeData`](matomo-org/matomo#11350), but Raphael leaves an empty object in the `eldata` map keyed on the element's old ID. Since kartographer/Piwik does not reuse IDs, `eldata` will grow continually on each redraw until the application is out of memory.
…is 2.0, but the tests are written for quint 1.0
Change website URL to HTTPS
In `elproto.drag`, `x` and `y` are initialized to `e.clientX` and `e.clientY` respectively, but then there is code to update those values for touch events. Ultimately, the updated `x` and `y` values are added to `scrollX/scrollY` and then stored in `this._drag.x/this._drag.y`. The values passed along to `eve("raphael.drag.start.", ...)` were `e.clientX + scrollX/e.clientY + scrollY` which are the pre-corrected values. With this PR, the corrected values `this._drag.x/this._drag.y` are passed instead.
Fix memory leak in `Element.removeData()`
Fix drag offsets passed to "drag.start" from touch drags in elproto.drag
There is a small typo in dev/raphael.svg.js, raphael.js, raphael.no-deps.js.

Should read `horizontal` rather than `horisontal`.
docs: Fix simple typo, horisontal -> horizontal
Fix passive event listener calling preventDefault() with drag
@naveenkumarganesan naveenkumarganesan changed the base branch from master to dev July 8, 2024 06:53
@naveenkumarganesan naveenkumarganesan changed the base branch from dev to master January 22, 2026 11:26
@naveenkumarganesan naveenkumarganesan changed the base branch from master to dev January 22, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants