rete icon indicating copy to clipboard operation
rete copied to clipboard

Editor display flips upside down sometimes when zooming in and out

Open iskandarreza opened this issue 5 years ago • 7 comments

Background: When I'm double-clicking on a node, the editor zooms in really close to the node. So I zoom out and sometimes it zooms out really fast and really far out. Then when I try to zoom back in/out quickly the whole editor flips upside down.

iskandarreza avatar Jun 04 '20 06:06 iskandarreza

I can confirm this also happens when just zooming out really quickly with the mousewheel. Has there been any traction on this? Happy to take a look if there's been no movement.

I suspect something is negated in the viewport without being handled correctly

tombasche avatar Apr 08 '21 03:04 tombasche

got the same problem any news ?

noxz-dev avatar Apr 26 '21 13:04 noxz-dev

got the same problem any news ?

I get the feeling this repository is somewhat abandoned; last commit was 6 months ago...

tombasche avatar Apr 26 '21 22:04 tombasche

yeah got the same feeling

this patch fixes the problem:


const fs = require('fs');
const path = require('path');

const loadRetePath = path.resolve(__dirname, '../node_modules/rete/build/rete.esm.js');

fs.writeFileSync(
  loadRetePath,
  fs
    .readFileSync(loadRetePath, 'utf8')
    .replace(
      'var delta = (wheelDelta ? wheelDelta / 120 : -e.deltaY / 3) * this.intensity;',
      'var delta = (wheelDelta ? wheelDelta / 120 : -e.deltaY / 50) * this.intensity;',
    ),
);

noxz-dev avatar Apr 29 '21 15:04 noxz-dev

yeah got the same feeling

this patch fixes the problem:

const fs = require('fs');
const path = require('path');

const loadRetePath = path.resolve(__dirname, '../node_modules/rete/build/rete.esm.js');

fs.writeFileSync(
  loadRetePath,
  fs
    .readFileSync(loadRetePath, 'utf8')
    .replace(
      'var delta = (wheelDelta ? wheelDelta / 120 : -e.deltaY / 3) * this.intensity;',
      'var delta = (wheelDelta ? wheelDelta / 120 : -e.deltaY / 50) * this.intensity;',
    ),
);

where should i write this code?

i have react-app where i use rete js

becausemirbek avatar May 28 '21 12:05 becausemirbek

its a postinstall patch so you have to run it after npm install

example (package.json):

"scripts": {
    "postinstall": "node ./scripts/rete-patch.js"
  },

noxz-dev avatar May 28 '21 12:05 noxz-dev

its a postinstall patch so you have to run it after npm install

example (package.json):

"scripts": {
    "postinstall": "node ./scripts/rete-patch.js"
  },

Thanks!

becausemirbek avatar May 28 '21 12:05 becausemirbek

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

rete-js[bot] avatar Jul 13 '23 10:07 rete-js[bot]