Giter Site home page Giter Site logo

Comments (10)

kumilingus avatar kumilingus commented on June 13, 2024

Did you go through our migration guide?
What are these 18 errors in the console?

from joint.

ROYopedia avatar ROYopedia commented on June 13, 2024

I am following the migration guide.
Console errors are related to api fetch error as I am running the app on local.

I am able to get the cells but position is not correct . If I use

scroller.zoomToFit({ padding: 10, useModelGeometry: true });

the cells not coming at all.
Also I tried to add pan and pinch event same as kitchesink demo app.

paper.on("paper:pan", (evt, tx, ty) => {
      evt.preventDefault();
      paperScroller.el.scrollLeft += tx;
      paperScroller.el.scrollTop += ty;
    });
    paper.on("paper:pinch", (_evt, ox, oy, scale) => {
      // the default is already prevented
      const zoom = paperScroller.zoom();
      paperScroller.zoom(zoom * scale, {
        min: 0.2,
        max: 5,
        ox,
        oy,
        absolute: true,
      });
    });

paperScroller.zoom() is not working at all.

from joint.

kumilingus avatar kumilingus commented on June 13, 2024

It's hard to say without a reproducible example.
The shapes seem to be rendered (they exist in the DOM). Perhaps they don't have their attributes set (d, width, height, etc.)? Could you check?
That could be related to the Disable useCSSSelectors by default breaking change.

from joint.

ROYopedia avatar ROYopedia commented on June 13, 2024

It has all attributes available.
Screenshot from 2024-03-13 12-49-44

It seems the position is not correct.
If I do

scroller.zoomToFit({ padding: 10, useModelGeometry: true }); 

It is not even showing in the viewport. If do a mousescrool zoom

function mousewheelZoom(evt: any, x: any, y: any, delta: any) {
      evt.preventDefault();
      let origin = paperScroller.getVisibleArea().center();
      paperScroller.zoom(delta * 0.12, {
        min: 0.1,
        max: 2,
        grid: 0.2,
        ox: x,
        oy: y,
      });
    }
    ```
    It is going out of the paper.
Any idea how to fit the cells in current viewport? 
Can you take a reference to demo of yours https://www.jointjs.com/demos/dwdm-circuit and make a upgradation to 4.0?

from joint.

kumilingus avatar kumilingus commented on June 13, 2024

The DWDM demo does not use the paper scroller plugin.

from joint.

ROYopedia avatar ROYopedia commented on June 13, 2024

I am facing multiple issue. Previously
joint-paper-scroller css class is taking width height by deafult 100%
Screenshot from 2024-03-13 14-11-00

Now migrating to 4.0 the joint-paper-scroller css class has no height width and it is having lots of space down. which is affecting zoom and other user events.
Screenshot from 2024-03-13 14-13-23

CSS i used for both

.canvas {
  width: 100%;
  height: 100%;
}
.joint-widget {
  padding: 2px;
}

body {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  background-color: var(--bg-color);
}
.joint-paper-scroller {
  top: auto;
}

from joint.

kumilingus avatar kumilingus commented on June 13, 2024

Is joint-plus.css imported at all?

from joint.

ROYopedia avatar ROYopedia commented on June 13, 2024

joint-plus.css

checking

from joint.

kumilingus avatar kumilingus commented on June 13, 2024

Ok, please let me rephrase it. You didn't import joint-plus.css properly. You are missing JointJS+ related CSS.
image

from joint.

github-actions avatar github-actions commented on June 13, 2024

This issue is stale because it has been open 60 days with no activity. Please remove stale label or comment or this will be closed in 14 days.

from joint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.