question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML in JointJS using ES6 import

See original GitHub issue

Hi guys. Thanks for creating and publishing of such a useful toll. I am just getting started with Html elements tutorial. With libraries from CDN it works. But if I try to import the libs from node_modules using ES6 import, the html elements aren’t rendered, although I installed the exact same versions of jquery, lodash, backbone and jointjs.


Using CDN

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.min.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.4.0/backbone-min.js">
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jointjs/3.0.2/joint.min.js">
</script>

Using ES6 import

import "jointjs/dist/joint.min.css";
import "./styles.css";

import * as $ from 'jquery';
import * as _ from 'lodash';
import * as Backbone from 'backbone';
import * as joint from 'jointjs';

/*
// alternatively
import $ from 'jquery';
import _ from 'lodash';
import Backbone from 'backbone'; 
import * as joint from 'jointjs';
*/

I’ve checked out already the issues #198 #201 #757 and #907

Any thoughts ?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
yfwz100commented, Sep 12, 2019

This can be fixed by specifying cellViewNamespace:

new joint.dia.Paper({
  el: this.$el,
  model: this.graph,
  width: '100%',
  height: '100%',
  cellViewNamespace: joint.shapes,
})
1reaction
kumilinguscommented, Jul 8, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue example app with TypeScript and SCSS - JointJS
Open "App.vue" and: Remove everything between the "<template>" tags. Remove the "import" of the HelloWorld component.
Read more >
Properly Importing v3 of JointJS - javascript - Stack Overflow
My team has to convert an implementation of JointJS from v2.2.1 to v3.0.2. The people who wrote this implementation are gone. The namespaces...
Read more >
jointjs - npm
JavaScript diagramming library. Latest version: 3.6.5, last published: 11 days ago. Start using jointjs in your project by running `npm i ...
Read more >
Fun with JointJs - DEMO (Full) - CodePen
About HTML Preprocessors. HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write...
Read more >
Getting started with JointJS+ trial | JointJS - YouTube
Watch this short video to successfully start your JointJS+ trial. Learn how to:✔️ get familiar with the Getting started guide,✔️ get ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found