mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-07 18:44:13 +00:00
Small refactor
This commit is contained in:
parent
b819e106fc
commit
33606b4cd7
@ -7,7 +7,7 @@ import {select, Selection} from 'd3-selection';
|
||||
import { Node } from "../shared/models/node";
|
||||
import { Link } from "../shared/models/link";
|
||||
import { GraphLayout } from "../shared/widgets/graph.widget";
|
||||
import { Context } from "../../map/models/context";
|
||||
import { Context } from "../shared/models/context";
|
||||
import { Size } from "../shared/models/size";
|
||||
import { Drawing } from "../shared/models/drawing";
|
||||
import {Symbol} from "../shared/models/symbol";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Size} from "../../cartography/shared/models/size";
|
||||
import {Selection} from "d3-selection";
|
||||
import {Point} from "../../cartography/shared/models/point";
|
||||
import {Size} from "./size";
|
||||
import {Point} from "./point";
|
||||
|
||||
|
||||
export class Context {
|
||||
private size: Size;
|
@ -1,4 +1,4 @@
|
||||
import {SVGSelection} from "../../map/models/types";
|
||||
import {SVGSelection} from "./models/types";
|
||||
|
||||
export interface Tool {
|
||||
connect(selection: SVGSelection);
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { select } from "d3-selection";
|
||||
import { Context } from "../../../map/models/context";
|
||||
import { SVGSelection } from "../../../map/models/types";
|
||||
import { Context } from "../models/context";
|
||||
import { SVGSelection } from "../models/types";
|
||||
import { MovingTool } from "./moving-tool";
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {SVGSelection} from "../../../map/models/types";
|
||||
import {Context} from "../../../map/models/context";
|
||||
import {SVGSelection} from "../models/types";
|
||||
import {Context} from "../models/context";
|
||||
import {D3ZoomEvent, zoom, ZoomBehavior} from "d3-zoom";
|
||||
import { event } from "d3-selection";
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
import { select } from "d3-selection";
|
||||
|
||||
import { SelectionTool } from "./selection-tool";
|
||||
import { Context } from "../../../map/models/context";
|
||||
import { SVGSelection } from "../../../map/models/types";
|
||||
import { Context } from "../models/context";
|
||||
import { SVGSelection } from "../models/types";
|
||||
import { Rectangle } from "../models/rectangle";
|
||||
|
||||
|
||||
|
@ -1,9 +1,10 @@
|
||||
import {SVGSelection} from "../../../map/models/types";
|
||||
import {mouse, select} from "d3-selection";
|
||||
import {Context} from "../../../map/models/context";
|
||||
import {Subject} from "rxjs/Subject";
|
||||
import {Rectangle} from "../models/rectangle";
|
||||
import {Injectable} from "@angular/core";
|
||||
import { Injectable } from "@angular/core";
|
||||
import { mouse, select } from "d3-selection";
|
||||
import { Subject } from "rxjs/Subject";
|
||||
|
||||
import { SVGSelection } from "../models/types";
|
||||
import { Context } from "../models/context";
|
||||
import { Rectangle } from "../models/rectangle";
|
||||
|
||||
|
||||
@Injectable()
|
||||
@ -83,7 +84,6 @@ export class SelectionTool {
|
||||
private moveSelection(start, move) {
|
||||
this.path.attr("d", this.rect(start[0], start[1], move[0] - start[0], move[1] - start[1]));
|
||||
this.selectedEvent(start, move);
|
||||
// this.getSelectedItems(start, move);
|
||||
}
|
||||
|
||||
private endSelection(start, end) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
import {DrawingLine} from "../models/drawing-line";
|
||||
import {SVGSelection} from "../../../map/models/types";
|
||||
import {SVGSelection} from "../models/types";
|
||||
import {Point} from "../models/point";
|
||||
import {line} from "d3-shape";
|
||||
import {mouse} from "d3-selection";
|
||||
import {Context} from "../../../map/models/context";
|
||||
import {Context} from "../models/context";
|
||||
|
||||
export class DrawingLineWidget {
|
||||
private drawingLine: DrawingLine = new DrawingLine();
|
||||
|
@ -1,6 +1,6 @@
|
||||
import {Widget} from "./widget";
|
||||
import {Drawing} from "../models/drawing";
|
||||
import {SVGSelection} from "../../../map/models/types";
|
||||
import {SVGSelection} from "../models/types";
|
||||
|
||||
|
||||
export class DrawingsWidget implements Widget {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Widget} from "./widget";
|
||||
import {SVGSelection} from "../../../map/models/types";
|
||||
import {SVGSelection} from "../models/types";
|
||||
|
||||
import { line } from "d3-shape";
|
||||
import {Link} from "../models/link";
|
||||
|
@ -1,9 +1,9 @@
|
||||
import { Context } from "../../../map/models/context";
|
||||
import { Context } from "../models/context";
|
||||
import { Node } from "../models/node";
|
||||
import { Link } from "../models/link";
|
||||
import { NodesWidget } from "./nodes.widget";
|
||||
import { Widget } from "./widget";
|
||||
import { SVGSelection } from "../../../map/models/types";
|
||||
import { SVGSelection } from "../models/types";
|
||||
import { LinksWidget } from "./links.widget";
|
||||
import { Drawing } from "../models/drawing";
|
||||
import { DrawingsWidget } from "./drawings.widget";
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {BaseType, select, Selection} from "d3-selection";
|
||||
|
||||
import { Widget } from "./widget";
|
||||
import { SVGSelection } from "../../../map/models/types";
|
||||
import { SVGSelection } from "../models/types";
|
||||
import { Link } from "../models/link";
|
||||
import { LinkStatus } from "../models/link-status";
|
||||
import { MultiLinkCalculatorHelper } from "../../map/helpers/multi-link-calculator-helper";
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Widget } from "./widget";
|
||||
import { Node } from "../models/node";
|
||||
import { SVGSelection } from "../../../map/models/types";
|
||||
import { SVGSelection } from "../models/types";
|
||||
import {event, select} from "d3-selection";
|
||||
import {D3DragEvent, drag} from "d3-drag";
|
||||
import {Symbol} from "../models/symbol";
|
||||
|
@ -1,5 +1,5 @@
|
||||
import {Widget} from "./widget";
|
||||
import {SVGSelection} from "../../../map/models/types";
|
||||
import {SVGSelection} from "../models/types";
|
||||
import {Link} from "../models/link";
|
||||
import { path } from "d3-path";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user