Browse Source

KERNEL-13947 refactor: 统一挂载

es6
Zhenfei.Li 2 years ago
parent
commit
2b80c67839
  1. 2
      src/core/action/action.js
  2. 2
      src/core/action/action.show.js
  3. 1
      src/core/behavior/0.behavior.js
  4. 1
      src/core/behavior/behavior.highlight.js
  5. 1
      src/core/behavior/behavior.redmark.js
  6. 1
      src/core/controller/0.controller.js
  7. 1
      src/core/controller/controller.broadcast.js
  8. 1
      src/core/controller/controller.bubbles.js
  9. 1
      src/core/controller/controller.drawer.js
  10. 1
      src/core/controller/controller.layer.js
  11. 1
      src/core/controller/controller.masker.js
  12. 1
      src/core/controller/controller.popover.js
  13. 2
      src/core/controller/controller.resizer.js
  14. 3
      src/core/controller/controller.tooltips.js
  15. 48
      src/core/index.js

2
src/core/action/action.js

@ -21,8 +21,6 @@ export default class Action extends OB {
} }
} }
BI.extend(BI, { Action });
BI.ActionFactory = { BI.ActionFactory = {
createAction: function (key, options) { createAction: function (key, options) {
var action; var action;

2
src/core/action/action.show.js

@ -18,5 +18,3 @@ export default class ShowAction extends Action {
callback && callback(); callback && callback();
} }
} }
BI.extend(BI, { ShowAction });

1
src/core/behavior/0.behavior.js

@ -32,4 +32,3 @@ export default class Behavior extends OB {
} }
} }
BI.extend(BI, { Behavior });

1
src/core/behavior/behavior.highlight.js

@ -32,4 +32,3 @@ export default class HighlightBehavior extends Behavior {
}); });
} }
} }
BI.extend(BI, { HighlightBehavior });

1
src/core/behavior/behavior.redmark.js

@ -22,4 +22,3 @@ export default class RedMarkBehavior extends Behavior {
}); });
} }
} }
BI.extend(BI, { RedMarkBehavior })

1
src/core/controller/0.controller.js

@ -10,4 +10,3 @@ import OB from "../3.ob";
export default class Controller extends OB { export default class Controller extends OB {
static EVENT_CHANGE = "__EVENT_CHANGE__"; static EVENT_CHANGE = "__EVENT_CHANGE__";
} }
BI.extend(BI, { Controller })

1
src/core/controller/controller.broadcast.js

@ -35,4 +35,3 @@ export default class BroadcastController extends Controller {
return this; return this;
} }
} }
BI.extend(BI, { BroadcastController })

1
src/core/controller/controller.bubbles.js

@ -99,4 +99,3 @@ export default class BubblesController extends Controller {
return this; return this;
} }
} }
BI.extend(BI, { BubblesController });

1
src/core/controller/controller.drawer.js

@ -154,4 +154,3 @@ export default class DrawerController extends Controller {
return this; return this;
} }
} }
BI.extend(BI, { DrawerController });

1
src/core/controller/controller.layer.js

@ -169,4 +169,3 @@ export default class LayerController extends Controller {
return this; return this;
} }
} }
BI.extend(BI, { LayerController });

1
src/core/controller/controller.masker.js

@ -11,4 +11,3 @@ export default class MaskersController extends LayerController {
this.zindex = BI.zIndex_masker; this.zindex = BI.zIndex_masker;
} }
} }
BI.extend(BI, { MaskersController });

1
src/core/controller/controller.popover.js

@ -166,4 +166,3 @@ export default class PopoverController extends Controller {
return this.zindex++; return this.zindex++;
} }
} }
BI.extend(BI, { PopoverController });

2
src/core/controller/controller.resizer.js

@ -64,5 +64,3 @@ export default class ResizeController extends Controller {
return this; return this;
} }
} }
BI.extend(BI, { ResizeController });

3
src/core/controller/controller.tooltips.js

@ -57,7 +57,7 @@ export default class TooltipsController extends Controller {
// scale影响要计算在内 // scale影响要计算在内
// const scale = context.element.offset().left / context.element.get(0).getBoundingClientRect().left; // const scale = context.element.offset().left / context.element.get(0).getBoundingClientRect().left;
// const x = (e.pageX || e.clientX) * scale + 15, y = (e.pageY || e.clientY) * scale + 15; // const x = (e.pageX || e.clientX) * scale + 15, y = (e.pageY || e.clientY) * scale + 15;
const x = (e.pageX || e.clientX) + 15, y = (e.pageY || e.clientY) + 15; let x = (e.pageX || e.clientX) + 15, y = (e.pageY || e.clientY) + 15;
if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) { if (x + tooltip.element.outerWidth() > BI.Widget._renderEngine.createElement("body").outerWidth()) {
x -= tooltip.element.outerWidth() + 15; x -= tooltip.element.outerWidth() + 15;
} }
@ -144,4 +144,3 @@ export default class TooltipsController extends Controller {
return this; return this;
} }
} }
BI.extend(BI, { TooltipsController });

48
src/core/index.js

@ -0,0 +1,48 @@
import Action from "./action/action";
import ShowAction from "./action/action.show";
import Behavior from "./behavior/0.behavior";
import HighlightBehavior from "./behavior/behavior.highlight";
import RedMarkBehavior from "./behavior/behavior.redmark";
import Controller from "./controller/0.controller";
import BroadcastController from "./controller/controller.broadcast";
import BubblesController from "./controller/controller.bubbles";
import DrawerController from "./controller/controller.drawer";
import LayerController from "./controller/controller.layer";
import MaskersController from "./controller/controller.masker";
import PopoverController from "./controller/controller.popover";
import ResizeController from "./controller/controller.resizer";
import TooltipsController from "./controller/controller.tooltips";
BI.extend(BI, {
Action,
ShowAction,
Behavior,
HighlightBehavior,
RedMarkBehavior,
Controller,
BroadcastController,
BubblesController,
DrawerController,
LayerController,
MaskersController,
PopoverController,
ResizeController,
TooltipsController,
});
export {
Action,
ShowAction,
Behavior,
HighlightBehavior,
RedMarkBehavior,
Controller,
BroadcastController,
BubblesController,
DrawerController,
LayerController,
MaskersController,
PopoverController,
ResizeController,
TooltipsController,
}
Loading…
Cancel
Save