Skip to content

Commit ad67a21

Browse files
authored
Merge pull request #33 from cmudig/development
window timeout and svg element/path coordinates fix
2 parents fd83b8a + 5cf995c commit ad67a21

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

app/static-bundle.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/v-bundle.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/static-app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1325,7 +1325,7 @@ const setGeometryData = () => {
13251325
let resizeTimer;
13261326
window.onresize = () => {
13271327
clearTimeout(resizeTimer);
1328-
resizeTimer = setTimeout(setGeometryData, 150);
1328+
resizeTimer = setTimeout(setGeometryData, 50);
13291329
};
13301330

13311331
setGeometryData();

src/rendering.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ export default (options: RenderingOptions) => {
179179
svg.setAttribute('width', totalWidth + '');
180180
svg.setAttribute('height', totalHeight + '');
181181
svg.setAttribute('viewBox', `0 0 ${totalWidth} ${totalHeight}`);
182-
svg.style.left = -x + '';
183-
svg.style.top = -y + '';
182+
svg.style.left = -x + 'px';
183+
svg.style.top = -y + 'px';
184184
svg.classList.add('dn-node-svg');
185185
svg.setAttribute('role', 'presentation');
186186
svg.setAttribute('focusable', 'false');

0 commit comments

Comments
 (0)