Code Monkey home page Code Monkey logo

yfiles-for-html-demos's Issues

Raect Sample issue when using `react-router-dom` built it capabilities

Using the React sample from yfiles-for-html-demos/toolkin/react and adding react-router-dom built it capabilities to the sample application the Graph is only being rendered for the first time.
The behaviour can be seen here https://github.com/hammerhg/yfiles-react-demo-test.

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/hammerhg/yfiles-react-demo-test
  2. Fix the location of the yfiles-23.0.4-dev.tgz and licence.json
  3. npm install
  4. npm start
  5. In the browser window make sure that the graph nodes and edges are visible.
  6. Click on the Other page link on he top left.
  7. Click on the Graph link on he top left.
  8. Observe that the nodes and edges are not visible.
  9. Refresh the page and observes the nodes and edges are visible.

Expected behavior
When navigating away and back to the graph page using react-router-dom built it capabilities the graph nodes and edges should be rerendered.

Screenshots
Initial state (before browsing to other-page)
Screen Shot 2021-02-07 at 23 49 00

After state (after browsing to back to graph)
Screen Shot 2021-02-07 at 23 49 14

Browser (please complete the following information):

  • yFiles HTML version: yfiles 23.0.4
  • Browser [Any]
  • Version [latest]
  • OS: [MacOS, Any]

2.3version Context Menu Demo has bug

Describe the bug
Right-click the invalid

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Context Menu Demo'
  2. Click on 'node'
  3. There was no reaction

Expected behavior
fix bug .

Screenshots
image

Browser (please complete the following information):

  • Browser [e.g. chrome, safari]
  • Version [e.g. 22.42]
  • OS: [mac 10.15.5]

Additional context
Add any other context about the problem here.

BPMN layout demo & data provider

Hello,

I'm Fabio, and I'm evaluating the yFiles layout library.
Experimenting with the BPMN layout code from the demo, I found that (not sure if it's a bug or something I didn't understand):

const affectedEdges = IMapper.fromDelegate(
edge =>
adapter.selectionModel.isSelected(edge) ||
adapter.selectionModel.isSelected(edge.sourceNode) ||
adapter.selectionModel.isSelected(edge.targetNode)
)
adapter.addDataProvider(
INode.$class,
YBoolean.$class,
LayoutKeys.AFFECTED_NODES_DP_KEY,
affectedEdges
)

the mapper maps edges, the data provider is using that mapper for nodes.
Is it correct? What I am missing?

thanks,
Fabio Pignaton

Cannot enable undo capabilities for grouped graph

I was trying to enable undo and redo as shown in demo https://live.yworks.com/demos/tutorial-yfiles-basic-features/07-undo-clipboard-support/
I the graph is an instance of DefaultGraph everything works as expected, but if I use a grouped graph I get the following error in console:

constructor {message: "Affected parameter graph: Provided graph can't provide undo support", name: 'ArgumentError', cause: null, stack: 'ArgumentError: Affected parameter graph: Provided …les/react-dom/cjs/react-dom.development.js:90:45)'}
cause:null
message: "Affected parameter graph: Provided graph can't provide undo support"
name:"ArgumentError"

The React demo issue removing/resetting graph

Describe the bug
When the demo at https://github.com/yWorks/yfiles-for-html-demos/tree/master/demos/toolkit/react is run the demo allows to add Nodes to the graph, but whenever you try to reset the graph using the reset button or remove any node one gets following error message:

Unhandled Rejection (ArgumentError): Affected parameter edge: Edge not in this graph!

ReactGraphComponent.updateGraph
src/components/ReactGraphComponent.jsx:196

193 | // update the graph based on the given graph data
194 | this.graphBuilder.setData(this.nodesSource, this.props.graphData.nodesSource)
195 | this.graphBuilder.setData(this.edgesSource, this.props.graphData.edgesSource)
->196 | this.graphBuilder.updateGraph()
197 | ^
198 | // apply a layout to re-arrange the new elements
199 | const layoutExecutor = new LayoutExecutor(this.graphComponent, new HierarchicLayout())

To Reproduce
Steps to reproduce the behavior:

  1. Run the project with > npm start wait for the Demo to start in the browser
  2. Click on 'Remove Node' button
  3. See the error

OR

  1. Run the project with > npm start wait for the Demo to start in the browser
  2. Click on 'Add Node' button
  3. Click on 'Reset' button (left top)
  4. See the error

Expected behavior
Remove the node and refresh the graph.

Browser (please complete the following information):
Full User Agent String
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.105 Safari/537.36

Additional context
Further debugging shows, that for some reason
this.graphBuilder.setData(this.nodesSource, this.props.graphData.nodesSource) this.graphBuilder.setData(this.edgesSource, this.props.graphData.edgesSource)

setData method internally compares the nodes and edges given in the props and cannot identify the node to be removed.

build files zoom bug

Describe the bug
when npm run build ,yfiles on zoomIn will lost some items

To Reproduce
Steps to reproduce the behavior:
1.just zoomIn

Expected behavior
should like localhost project

Screenshots
image
image

Browser (please complete the following information):

  • Browser [e.g. chrome, safari]
  • Version [e.g. 22.42]
  • OS: [e.g. Windows]

Additional context
please reply quickly

A few questions

Hello.. i downloaded ur source code want to know can i add my own shapes and electric circuit shapes.. ?? and save them or make a user to login thank you

vue npm run build console error

cause: null
message: "Missing Module: This feature requires the 'view-layout-bridge' module. Either load the module 'view-layout-bridge' explicitly or call 'Class.ensure(LayoutExecutor)'."
name: "InvalidOperationError"

Drag and drop for restructure org chart

Hi Team ,
Current Org chart support drag and drop external components as per demo .
I need feature where we can drag and drop org chart node within orgchart .

like Manager -> TL -> employee
Manager -> employee -> TL

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.