mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-02-01 16:08:17 +00:00
1、Config移动到core文件夹。
2、新增Options选项类。
This commit is contained in:
parent
aa5e54ae9c
commit
7069e367df
@ -1,3 +1,4 @@
|
||||
import Options from './Options';
|
||||
import Editor from './Editor';
|
||||
import EventDispatcher from './event/EventDispatcher';
|
||||
import Viewport from './ui/Viewport';
|
||||
@ -12,9 +13,10 @@ import RemoveObjectCommand from './command/RemoveObjectCommand';
|
||||
/**
|
||||
* 应用程序
|
||||
*/
|
||||
function Application(container) {
|
||||
function Application(container, options) {
|
||||
|
||||
this.container = container;
|
||||
this.options = new Options(options);
|
||||
|
||||
// 事件
|
||||
this.event = new EventDispatcher(this);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import Config from './Config';
|
||||
import Config from './core/Config';
|
||||
import Signal from './core/Signal';
|
||||
import History from './core/History';
|
||||
import Storage from './core/Storage';
|
||||
|
||||
10
src/Options.js
Normal file
10
src/Options.js
Normal file
@ -0,0 +1,10 @@
|
||||
/**
|
||||
* 配置选项
|
||||
* @param {*} options 配置选项
|
||||
*/
|
||||
function Options(options) {
|
||||
options = options || {};
|
||||
this.server = options.server || 'http://127.0.0.1:1500';
|
||||
}
|
||||
|
||||
export default Options;
|
||||
@ -1,3 +1,4 @@
|
||||
export { default as Config } from './Config';
|
||||
export { default as History } from './History';
|
||||
export { default as Storage } from './Storage';
|
||||
export { default as Loader } from './Loader';
|
||||
|
||||
@ -7,6 +7,6 @@ export * from './ui/index';
|
||||
export * from './menu/index';
|
||||
export * from './panel/index';
|
||||
|
||||
export { default as Config } from './Config';
|
||||
export { default as Options } from './Options';
|
||||
export { default as Editor } from './Editor';
|
||||
export { default as Application } from './Application';
|
||||
Loading…
x
Reference in New Issue
Block a user