调整目录结构

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';
// 图形抽象层
export default class AbstractShape {
class AbstractShape {
constructor({model, defaultStyle, option, shapeFactory}) {
this.model = model;
this.option = option;
@ -29,3 +29,4 @@ export default class AbstractShape {
setState(state) {}
}
export default AbstractShape;

View File

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

View File

@ -1,5 +1,5 @@
import _ from 'lodash';
import * as graphic from '../utils/graphic';
import * as graphic from '../core/graphic';
import * as eventTool from 'zrender/src/core/event';
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';
class Compose extends AbstractShape {

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
class Options {
class Option {
constructor(opts, trigger) {
this.scaleIndex = 0;
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 StateHandle from './stateHandle';
import TipsHandle from './tipsHandle';
import * as graphic from './utils/graphic';
import * as graphic from './core/graphic';
class Painter extends Group {
constructor(map) {

View File

@ -1,6 +1,6 @@
import LineDraggable from './draggable/Line';
import ImageDraggable from './draggable/Image';
import * as graphic from './utils/graphic';
import * as graphic from './core/graphic';
export default class SelectHandle {
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';
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 shapeRender from './constant/shapeRender';