调整目录结构

This commit is contained in:
ival 2021-03-31 08:53:05 +08:00
parent 0381242401
commit d9a8baeb93
19 changed files with 15 additions and 13 deletions

View File

@ -1,7 +1,7 @@
import shapeType from '../constant/shapeType'; import shapeType from '../constant/shapeType';
// 图形抽象层 // 图形抽象层
export default class AbstractShape { class AbstractShape {
constructor({model, defaultStyle, option, shapeFactory}) { constructor({model, defaultStyle, option, shapeFactory}) {
this.model = model; this.model = model;
this.option = option; this.option = option;
@ -29,3 +29,4 @@ export default class AbstractShape {
setState(state) {} setState(state) {}
} }
export default AbstractShape;

View File

@ -1,6 +1,6 @@
import _ from 'lodash'; import _ from 'lodash';
import * as graphic from '../utils/graphic'; import * as graphic from '../core/graphic';
import * as eventTool from 'zrender/src/core/event'; import * as eventTool from 'zrender/src/core/event';
import shapeRender from '../constant/shapeRender'; import shapeRender from '../constant/shapeRender';

View File

@ -1,5 +1,5 @@
import _ from 'lodash'; import _ from 'lodash';
import * as graphic from '../utils/graphic'; import * as graphic from '../core/graphic';
import * as eventTool from 'zrender/src/core/event'; import * as eventTool from 'zrender/src/core/event';
import shapeRender from '../constant/shapeRender'; import shapeRender from '../constant/shapeRender';

View File

@ -1,4 +1,4 @@
import AbstractShape from './Shape'; import AbstractShape from '../core/abstractShape';
import Group from 'zrender/src/container/Group'; import Group from 'zrender/src/container/Group';
class Compose extends AbstractShape { class Compose extends AbstractShape {

View File

@ -1,5 +1,5 @@
import AbstractShape from './Shape'; import AbstractShape from '../core/abstractShape';
import * as graphic from '../utils/graphic'; import * as graphic from '../core/graphic';
class Element extends AbstractShape { class Element extends AbstractShape {
constructor(args) { constructor(args) {
super(args); super(args);

View File

@ -9,6 +9,7 @@ const shapeBuilderMap = {
[shapeType.Element]: Element, [shapeType.Element]: Element,
[shapeType.Compose]: Compose [shapeType.Compose]: Compose
} }
class ShapeFactory { class ShapeFactory {
constructor(map) { constructor(map) {
this.$map = map; this.$map = map;

View File

@ -6,7 +6,7 @@ import Painter from './painter';
import Option from './option'; import Option from './option';
import Controller from './controller'; // 事件集合 import Controller from './controller'; // 事件集合
import DefaultStyle from './config/defaultStyle'; // 样式集合 import DefaultStyle from './config/defaultStyle'; // 样式集合
import ShapeFactory from './parser'; import ShapeFactory from './factory';
const renderer = 'canvas'; const renderer = 'canvas';
const devicePixelRatio = 1; const devicePixelRatio = 1;

View File

@ -1,4 +1,4 @@
class Options { class Option {
constructor(opts, trigger) { constructor(opts, trigger) {
this.scaleIndex = 0; this.scaleIndex = 0;
this.scaleList = [ this.scaleList = [
@ -82,4 +82,4 @@ class Options {
} }
} }
export default Options; export default Option;

View File

@ -4,7 +4,7 @@ import Group from 'zrender/src/container/Group';
import TransformHandle from './transformHandle'; import TransformHandle from './transformHandle';
import StateHandle from './stateHandle'; import StateHandle from './stateHandle';
import TipsHandle from './tipsHandle'; import TipsHandle from './tipsHandle';
import * as graphic from './utils/graphic'; import * as graphic from './core/graphic';
class Painter extends Group { class Painter extends Group {
constructor(map) { constructor(map) {

View File

@ -1,6 +1,6 @@
import LineDraggable from './draggable/Line'; import LineDraggable from './draggable/Line';
import ImageDraggable from './draggable/Image'; import ImageDraggable from './draggable/Image';
import * as graphic from './utils/graphic'; import * as graphic from './core/graphic';
export default class SelectHandle { export default class SelectHandle {
constructor(map, controller) { constructor(map, controller) {

View File

@ -1,4 +1,4 @@
import * as graphic from './utils/graphic.js'; import * as graphic from './core/graphic.js';
import shapeRender from './constant/shapeRender'; import shapeRender from './constant/shapeRender';
function shapeStyleBuilder() { function shapeStyleBuilder() {

View File

@ -1,4 +1,4 @@
import * as graphic from './utils/graphic'; import * as graphic from './core/graphic';
import Eventful from 'zrender/src/mixin/Eventful'; import Eventful from 'zrender/src/mixin/Eventful';
import shapeRender from './constant/shapeRender'; import shapeRender from './constant/shapeRender';