refactor: ♻️ remove unused variables
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import { Graph, Path } from '@antv/x6'
|
||||
import { Graph } from '@antv/x6'
|
||||
|
||||
Graph.registerConnector(
|
||||
'pai',
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { Graph, Edge, CellView, EdgeView, Dom, Vector } from '@antv/x6'
|
||||
import { Graph, Edge, CellView, EdgeView, Vector } from '@antv/x6'
|
||||
import '../index.less'
|
||||
|
||||
class CustomEdgeView extends EdgeView {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react'
|
||||
import { Graph, Cell, Edge, EdgeView } from '@antv/x6'
|
||||
import { Graph, EdgeView } from '@antv/x6'
|
||||
import './distance-shape'
|
||||
import '../index.less'
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
import React from 'react'
|
||||
import { Input } from 'antd'
|
||||
import { Graph, Node, Color } from '@antv/x6'
|
||||
import '@antv/x6-react-shape'
|
||||
import '../index.less'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom'
|
||||
import { Graph, Dom, Shape, Node, Path } from '@antv/x6'
|
||||
import { Graph, Dom, Shape, Node } from '@antv/x6'
|
||||
import { Tooltip } from 'antd'
|
||||
import classnames from 'classnames'
|
||||
import '@antv/x6-react-shape'
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { NumberExt, Shape, Path } from '@antv/x6'
|
||||
import { Shape, Path } from '@antv/x6'
|
||||
|
||||
Shape.Path.define({
|
||||
title: 'Terminator',
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Graph, Color, CellView } from '@antv/x6'
|
||||
import { Graph } from '@antv/x6'
|
||||
|
||||
const graph = new Graph({
|
||||
container: document.getElementById('container'),
|
||||
container: document.getElementById('container')!,
|
||||
grid: true,
|
||||
})
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Graph, Node, Shape } from '@antv/x6'
|
||||
import { Graph, Shape } from '@antv/x6'
|
||||
|
||||
class FlexImage extends Shape.Image {
|
||||
private url: string
|
||||
|
@ -3,8 +3,8 @@ import SVGO from 'SVGO'
|
||||
import classnames from 'classnames'
|
||||
import SyntaxHighlighter from 'react-syntax-highlighter'
|
||||
import { monokai } from 'react-syntax-highlighter/dist/esm/styles/hljs'
|
||||
import * as svgo from './svgo'
|
||||
import { Graph, Markup } from '@antv/x6'
|
||||
import * as svgo from './svgo'
|
||||
import { App } from '../index'
|
||||
import './content.less'
|
||||
|
||||
@ -138,8 +138,6 @@ graph.addNode({
|
||||
}
|
||||
|
||||
render() {
|
||||
const tab = this.props.tab
|
||||
|
||||
return (
|
||||
<div className="body">
|
||||
<div className="output">
|
||||
|
@ -39,7 +39,7 @@ import removeEmptyAttrs from 'svgo/plugins/removeEmptyAttrs'
|
||||
import removeEmptyContainers from 'svgo/plugins/removeEmptyContainers'
|
||||
import mergePaths from 'svgo/plugins/mergePaths'
|
||||
import removeUnusedNS from 'svgo/plugins/removeUnusedNS'
|
||||
import removeOffCanvasPaths from 'svgo/plugins/removeOffCanvasPaths'
|
||||
// import removeOffCanvasPaths from 'svgo/plugins/removeOffCanvasPaths'
|
||||
import reusePaths from 'svgo/plugins/reusePaths'
|
||||
import sortAttrs from 'svgo/plugins/sortAttrs'
|
||||
import sortDefsChildren from 'svgo/plugins/sortDefsChildren'
|
||||
@ -171,7 +171,7 @@ export function optimize(svgText, settings) {
|
||||
minifyStyles,
|
||||
convertStyleToAttrs,
|
||||
cleanupIDs,
|
||||
//prefixIds,
|
||||
// prefixIds,
|
||||
removeRasterImages,
|
||||
removeUselessDefs,
|
||||
cleanupNumericValues,
|
||||
@ -203,13 +203,13 @@ export function optimize(svgText, settings) {
|
||||
removeTitle,
|
||||
removeDesc,
|
||||
removeDimensions,
|
||||
//removeAttrs,
|
||||
//removeElementsByAttr,
|
||||
//removeAttributesBySelector,
|
||||
//addClassesToSVGElement,
|
||||
// removeAttrs,
|
||||
// removeElementsByAttr,
|
||||
// removeAttributesBySelector,
|
||||
// addClassesToSVGElement,
|
||||
removeStyleElement,
|
||||
removeScriptElement,
|
||||
//addAttributesToSVGElement,
|
||||
// addAttributesToSVGElement,
|
||||
}
|
||||
|
||||
// activate/deactivate plugins
|
||||
|
Reference in New Issue
Block a user