Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: JQuery Removal #2414

Merged
merged 58 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from 51 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
69e440c
init submodule
vtalas Nov 29, 2023
1cadfc3
init submodule
vtalas Nov 29, 2023
16b1a1a
revert
vtalas Nov 29, 2023
02d478a
jQuery removal
kumilingus Nov 23, 2023
c052929
update
kumilingus Nov 23, 2023
cf35f20
update
kumilingus Nov 23, 2023
f58d74d
update
kumilingus Nov 24, 2023
458f2d5
update
kumilingus Nov 24, 2023
849862a
update
kumilingus Nov 24, 2023
b14b476
update
kumilingus Nov 25, 2023
abc458d
upadte
kumilingus Nov 27, 2023
c56960c
update
kumilingus Nov 27, 2023
da3369c
update
kumilingus Nov 27, 2023
d4170fd
simplify find
kumilingus Nov 27, 2023
1a34383
simplify core part 1
kumilingus Nov 27, 2023
96dbede
simplify core part 2
kumilingus Nov 27, 2023
27be0ca
update
kumilingus Nov 28, 2023
4fd86cf
update
kumilingus Nov 28, 2023
1c0e152
update
kumilingus Nov 30, 2023
e0e7c7c
update
kumilingus Nov 30, 2023
a213427
types
kumilingus Nov 30, 2023
0fe8cae
update
kumilingus Dec 1, 2023
9b2581b
update
kumilingus Dec 1, 2023
1f95d06
update demos
kumilingus Dec 1, 2023
fb718d3
update
kumilingus Dec 2, 2023
37b344a
update
kumilingus Dec 2, 2023
006fdac
docs demos
kumilingus Dec 2, 2023
182f696
update
kumilingus Dec 3, 2023
3db8319
update
kumilingus Dec 3, 2023
f6edb95
update tutorials
kumilingus Dec 4, 2023
7510ee2
update
kumilingus Dec 4, 2023
ee8e70d
update routing demo
kumilingus Dec 4, 2023
12c6082
update
kumilingus Dec 4, 2023
95f85f2
update
kumilingus Dec 4, 2023
c4e9400
update
kumilingus Dec 4, 2023
4b3f8b2
update
kumilingus Dec 4, 2023
d292369
update
kumilingus Dec 4, 2023
8639fdc
update
kumilingus Dec 4, 2023
126dad5
update
kumilingus Dec 4, 2023
bd447d2
update
kumilingus Dec 5, 2023
9310fa9
fix nodejs test
kumilingus Dec 5, 2023
87e08ad
update
kumilingus Dec 5, 2023
a043cbe
update
kumilingus Dec 5, 2023
250407f
update
kumilingus Dec 6, 2023
061724a
update
kumilingus Dec 6, 2023
59413fa
update
kumilingus Dec 6, 2023
2eb9471
update
kumilingus Dec 6, 2023
5b0b757
add findNode()
kumilingus Dec 7, 2023
a4a39ef
update
kumilingus Dec 7, 2023
44dee8b
update
kumilingus Dec 7, 2023
99df506
udpate
kumilingus Dec 7, 2023
842025b
udpate
kumilingus Dec 7, 2023
34ef135
update
kumilingus Dec 7, 2023
9311a7b
update
kumilingus Dec 8, 2023
9d7349e
update
kumilingus Dec 8, 2023
308a77d
Update packages/joint-core/docs/src/joint/api/dia/ElementView/prototy…
kumilingus Dec 8, 2023
0b3ee8a
Update packages/joint-core/docs/src/joint/api/dia/ElementView/prototy…
kumilingus Dec 8, 2023
3fa33f5
Update packages/joint-core/docs/src/joint/api/dia/LinkView/prototype/…
kumilingus Dec 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions packages/joint-core/demo/archive/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@

<div id="paper"></div>

<!-- Dependencies: -->
<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../node_modules/lodash/lodash.js"></script>

<script src="../../build/joint.js"></script>

<script src="./basic.js"></script>

</body>
Expand Down
2 changes: 1 addition & 1 deletion packages/joint-core/demo/archive/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
var graph = new joint.dia.Graph;

var paper = new joint.dia.Paper({
el: $('#paper'),
el: document.getElementById('paper'),
width: 650,
height: 400,
gridSize: 20,
Expand Down
4 changes: 0 additions & 4 deletions packages/joint-core/demo/archive/clipping.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@

<div id="paper"></div>

<!-- Dependencies: -->
<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../node_modules/lodash/lodash.js"></script>

<script src="../../build/joint.js"></script>

<script src="./clipping.js"></script>
Expand Down
4 changes: 0 additions & 4 deletions packages/joint-core/demo/archive/links.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@
<label>Perpendicular links</label><input type="checkbox" id="perpendicularLinks" />
<div id="paper"></div>

<!-- Dependencies: -->
<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../node_modules/lodash/lodash.js"></script>

<script src="../../build/joint.js"></script>

<script src="./links.js"></script>
Expand Down
4 changes: 2 additions & 2 deletions packages/joint-core/demo/archive/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ paper.on('link:connect', function(linkView, evt, connectedToView, magnetElement,
console.log('link:connect', type, connectedToView, magnetElement);
});

$('#perpendicularLinks').on('change', function() {
paper.options.perpendicularLinks = $(this).is(':checked') ? true : false;
document.getElementById('perpendicularLinks').addEventListener('change', function(evt) {
paper.options.perpendicularLinks = evt.target.checked ? true : false;
});

// custom link definition
Expand Down
3 changes: 0 additions & 3 deletions packages/joint-core/demo/bandwidth/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
<body>
<div id="paper"></div>

<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../node_modules/lodash/lodash.js"></script>

<script src="../../build/joint.js"></script>

<script src="src/bandwidth.js"></script>
Expand Down
4 changes: 0 additions & 4 deletions packages/joint-core/demo/bus/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@

<div id="paper"></div>

<!-- Dependencies: -->
<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../node_modules/lodash/lodash.js"></script>

<script src="../../build/joint.js"></script>
<script src="src/joint.shapes.mix.js"></script>
<script src="src/bus.js"></script>
Expand Down
3 changes: 0 additions & 3 deletions packages/joint-core/demo/chess/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

<div id="message"></div>

<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../node_modules/lodash/lodash.js"></script>

<script src="../../build/joint.js"></script>
<script src="src/garbochess.js"></script>
<script src="src/chess.js"></script>
Expand Down
1 change: 0 additions & 1 deletion packages/joint-core/demo/container/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<div id="paper"></div>

<!-- Dependencies: -->
<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../node_modules/lodash/lodash.js"></script>
<script src="../../node_modules/graphlib/dist/graphlib.min.js"></script>
<script src="../../node_modules/dagre/dist/dagre.min.js"></script>
Expand Down
2 changes: 0 additions & 2 deletions packages/joint-core/demo/curves/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
</head>
<body>
<div id="paper"></div>
<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../node_modules/lodash/lodash.js"></script>
<script src="../../build/joint.js"></script>
<script src="src/curves.js"></script>
</body>
Expand Down
3 changes: 0 additions & 3 deletions packages/joint-core/demo/devs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@
<div id="paper"></div>

<!-- Dependencies: -->
<script src="../../node_modules/jquery/dist/jquery.js"></script>
<script src="../../node_modules/lodash/lodash.js"></script>

<script src="../../build/joint.js"></script>

<script src="src/shapes.devs.js"></script>
Expand Down
5 changes: 0 additions & 5 deletions packages/joint-core/demo/dgl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,13 @@
"build": "webpack --config webpack.config.js",
"start": "webpack serve --config webpack.config.js"
},
"dependencies": {
"jquery": "~3.5.1",
"lodash": "~4.17.20"
},
"devDependencies": {
"@babel/core": "7.10.4",
"@babel/preset-env": "7.10.4",
"babel-loader": "8.1.0",
"copy-webpack-plugin": "5.1.1",
"core-js": "3.6.1",
"css-loader": "3.5.3",
"elkjs": "0.6.2",
"file-loader": "6.0.0",
"regenerator-runtime": "0.13.5",
"sass": "1.26.8",
Expand Down
39 changes: 24 additions & 15 deletions packages/joint-core/demo/dgl/src/directed-graph.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import * as dagre from 'dagre';
import * as joint from '../../../joint.mjs';

function val(view, selector, val) {
var el = view.el.querySelector(selector);
if (!el) return null;
if (val === undefined) {
return el.value;
}
el.value = val;
}

var Shape = joint.dia.Element.define('demo.Shape', {
z: 2,
size: {
Expand Down Expand Up @@ -180,12 +189,12 @@ var LayoutControls = joint.mvc.View.extend({
graphlib: dagre.graphlib,
setVertices: true,
setLabels: true,
ranker: this.$('#ranker').val(),
rankDir: this.$('#rankdir').val(),
align: this.$('#align').val(),
rankSep: parseInt(this.$('#ranksep').val(), 10),
edgeSep: parseInt(this.$('#edgesep').val(), 10),
nodeSep: parseInt(this.$('#nodesep').val(), 10)
ranker: val(this, '#ranker'),
rankDir: val(this, '#rankdir'),
align: val(this, '#align'),
rankSep: parseInt(val(this, '#ranksep'), 10),
edgeSep: parseInt(val(this, '#edgesep'), 10),
nodeSep: parseInt(val(this, '#nodesep'), 10)
};
},

Expand Down Expand Up @@ -254,18 +263,18 @@ var LinkControls = joint.mvc.View.extend({

var link = this.options.cellView.model;

this.$('#labelpos').val(link.get('labelPosition'));
this.$('#labeloffset').val(link.get('labelOffset'));
this.$('#minlen').val(link.get('minLen'));
this.$('#weight').val(link.get('weight'));
val(this, '#labelpos', link.get('labelPosition'));
val(this, '#labeloffset', link.get('labelOffset'));
val(this, '#minlen', link.get('minLen'));
val(this, '#weight', link.get('weight'));
},

getModelAttributes: function() {
return {
minLen: parseInt(this.$('#minlen').val(), 10),
weight: parseInt(this.$('#weight').val(), 10),
labelPosition: this.$('#labelpos').val(),
labelOffset: parseInt(this.$('#labeloffset').val(), 10)
minLen: parseInt(val(this, '#minlen'), 10),
weight: parseInt(val(this, '#weight'), 10),
labelPosition: val(this, '#labelpos'),
labelOffset: parseInt(val(this, '#labeloffset'), 10)
};
},

Expand All @@ -289,7 +298,7 @@ var LinkControls = joint.mvc.View.extend({
el: this.template.cloneNode(true),
cellView: linkView
});
this.instance.$el.insertAfter('#layout-controls');
document.getElementById('layout-controls').after(this.instance.el);
},

remove: function() {
Expand Down
Loading