Skip to content

Commit

Permalink
Merge pull request #18 from OneraHub/release-1.0
Browse files Browse the repository at this point in the history
Release 1.0
  • Loading branch information
relf authored Sep 20, 2020
2 parents c0ad70d + 8bb4b5f commit 7bb147f
Show file tree
Hide file tree
Showing 16 changed files with 1,881 additions and 1,580 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ py_xdsmjs/**/dist
*egg-info
**/__pycache__
.pytest_cache

#safe-buffer licensing
dist/xdsmjs-test.js.LICENSE.txt
10 changes: 2 additions & 8 deletions dist/xdsmjs-test.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/xdsmjs-test.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/xdsmjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/xdsmjs.js.map

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xdsmjs",
"version": "0.8.4",
"version": "1.0.0",
"description": "XDSM diagram generator",
"main": "src/index.js",
"files": [
Expand Down Expand Up @@ -39,24 +39,23 @@
"babel-core": "^7.0.0-bridge",
"babel-loader": "^8.0.0",
"babel-tape-runner": "^3.0.0",
"eslint": "^6.2.0",
"eslint": "^7.9.0",
"eslint-config-airbnb": "^18.0.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"faucet": "0.0.1",
"tape": "^4.9.1",
"uglify-js": "^3.4.9",
"uglifyjs-webpack-plugin": "^2.0.1",
"tape": "^5.0.0",
"terser-webpack-plugin": "^4.2.2",
"webpack": "^4.26.0",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
},
"dependencies": {
"d3-color": "^1.2.3",
"d3-fetch": "^1.1.2",
"d3-selection": "^1.3.2",
"d3-transition": "^1.1.3"
"d3-color": "^2.0.0",
"d3-fetch": "^2.0.0",
"d3-selection": "^2.0.0",
"d3-transition": "^2.0.0"
},
"eslintConfig": {
"extends": [
Expand Down Expand Up @@ -87,4 +86,4 @@
"brace-style": "off"
}
}
}
}
2 changes: 1 addition & 1 deletion py_xdsmjs/xdsmjs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.8.4"
__version__ = "1.0.0"

import os

Expand Down
1 change: 0 additions & 1 deletion src/animation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { select, selectAll } from 'd3-selection';
import { rgb } from 'd3-color';
import Graph from './graph';
Expand Down
2 changes: 0 additions & 2 deletions src/controls.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { select } from 'd3-selection';
import Animation from './animation';
import { VERSION1, VERSION2 } from './xdsm';
Expand Down Expand Up @@ -28,7 +27,6 @@ function Controls(animation, defaultVersion) {
buttonGroup.append('select')
.attr('id', 'xdsm-version-toggle');


this.startButton = select('button#start');
this.stopButton = select('button#stop');
this.stepPrevButton = select('button#step-prev');
Expand Down
1 change: 0 additions & 1 deletion src/graph.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

const UID = '_U_';
const UNAME = 'User';
const MULTI_TYPE = '_multi';
Expand Down
1 change: 0 additions & 1 deletion src/labelizer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

function Labelizer() { }

Labelizer.strParse = function strParse(str, subSupScript) {
Expand Down
1 change: 0 additions & 1 deletion src/selectable.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { select, selectAll } from 'd3-selection';

function Selectable(xdsm, callback) {
Expand Down
4 changes: 2 additions & 2 deletions src/xdsm-factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Copyright 2016-2020 Rémi Lafage
*/
import { json } from 'd3-fetch';
import { select, event } from 'd3-selection';
import { select } from 'd3-selection';
import Graph from './graph';
import Xdsm, { VERSION1, VERSION2 } from './xdsm';

Expand Down Expand Up @@ -109,7 +109,7 @@ class XdsmFactory {
xdsms[k].draw();
xdsms[k].svg.select('.optimization').on(
'click',
() => {
(event) => {
const info = select(`.optpb.${k}`);
info.style('opacity', 0.9);
info.style('left', `${event.pageX}px`).style('top',
Expand Down
5 changes: 2 additions & 3 deletions src/xdsm.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

import { select, selectAll, event } from 'd3-selection';
import { select, selectAll } from 'd3-selection';
import 'd3-transition';
import Graph from './graph';
import Labelizer from './labelizer';
Expand Down Expand Up @@ -188,7 +187,7 @@ Xdsm.prototype._createTextGroup = function _createTextGroup(kind, group, decorat
selection.exit().remove(); // EXIT

if (self.tooltip) {
selectAll('.ellipsized').on('mouseover', (d) => {
selectAll('.ellipsized').on('mouseover', (event, d) => {
self.tooltip.transition().duration(200).style('opacity', 0.9);
const tooltipize = Labelizer.tooltipize()
.subSupScript(self.config.labelizer.subSupScript)
Expand Down
9 changes: 5 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');

module.exports = {
mode: 'development',
Expand Down Expand Up @@ -31,7 +31,8 @@ module.exports = {
node: {
fs: 'empty',
},
plugins: [
new UglifyJSPlugin({ sourceMap: true }),
],
optimization: {
minimize: true,
minimizer: [new TerserPlugin()],
},
};
Loading

0 comments on commit 7bb147f

Please sign in to comment.