GithubHelp home page GithubHelp logo

lgleim / mxgraph-typings Goto Github PK

View Code? Open in Web Editor NEW
24.0 9.0 28.0 475 KB

Typescript Type Definitions / Typings for https://github.com/jgraph/mxgraph

License: MIT License

typescript typings mxgraph jgraph

mxgraph-typings's People

Contributors

arpitvkarma avatar lgleim avatar matracey avatar tambry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mxgraph-typings's Issues

Module not found: Error: Can't resolve 'mxgraph'

Hi Lars,

I'm trying to implement your example

const mx = require('mxgraph')({
mxImageBasePath: 'mxgraph/images',
mxBasePath: 'mxgraph'
});
and am getting "Module not found: Error: Can't resolve 'mxgraph'".

I'm building with Angular CLI / Webpack.
The following is my tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es2016",
"lib": [
"es6",
"dom"
],
"traceResolution": true,
}

Any suggestions?

Thanks
Dave

Example usage

Lars,
This looks like a great start to typings in mxGraph. it looks like there is a slight issue with the way that modules work in typescript now. when I try to use the library with import {mxCell} from 'mxgraph' I get the error 'No exported member' however if i remove the export module mxgraph {} from the index.d.ts it works as expected.

Can you provide some example documentation on how you are utilizing the typings?

Nic

How to use mxgraph in Angular CLI?

I have a generated a new Angular CLI project and want to use mxgraph in this project. For that, I have installed mxgraph and your typings with:

npm install mxgraph --save
npm install -D lgleim/mxgraph-typings

The mxgraph package contains a single mxClient. When I use your example code of your REAME.md file, I get the following error:

ERROR in ./src/app/graph-editor/graph-editor.component.ts
Module not found: Error: Can't resolve 'mxgraph'

I have also tried to copy the mxgraph git repo to the directory src/mxgraph and src/assets/mxgraph, but this did not fix the error above.

Maybe you can give me some hints what I have to do to use mxgraph in an Angular CLI project with your typings?

Missing license

Hi,
we would really like to use your project but unfortunately, you do not provide a license.
Could you add an open source license like Apache 2.0 (the one mxgraph uses) or similar?

It would be much appreciated.
Thank you for providing the bindings!

How to extend mxGraph classes?

image

// Overrides zIndex for dragElement mx.mxDragSource.prototype.dragElementZIndex = mx.mxPopupMenu.prototype.zIndex;

How to extend mxGraph classes? I tried the above method. But it doesn't work.

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.