FIX comments
This commit is contained in:
parent
02770032bf
commit
5d09211c5d
@ -174,7 +174,7 @@ define(
|
||||
* 设置操作的shapes
|
||||
*/
|
||||
ShapesGroup.prototype.setMode = function(mode) {
|
||||
this.mode = mode; // 两种变化模式,scale和rotate
|
||||
this.mode = mode; // 三种变化模式,scale/rotate/move
|
||||
};
|
||||
|
||||
|
||||
|
@ -37,6 +37,7 @@ define(
|
||||
if (elableSorption) {
|
||||
var centerX = bound.x + bound.width / 2;
|
||||
var centerY = bound.y + bound.height / 2;
|
||||
var sorptionColor = this.editor.options.sorption.sorptionColor;
|
||||
|
||||
if (!fixX) {
|
||||
|
||||
@ -47,7 +48,7 @@ define(
|
||||
type: 'line',
|
||||
id: 'sorptionX',
|
||||
style: {
|
||||
strokeColor: '#4AFF4A'
|
||||
strokeColor: sorptionColor
|
||||
},
|
||||
p0: {},
|
||||
p1: {}
|
||||
@ -82,7 +83,7 @@ define(
|
||||
type: 'line',
|
||||
id: 'sorptionY',
|
||||
style: {
|
||||
strokeColor: '#4AFF4A'
|
||||
strokeColor: sorptionColor
|
||||
},
|
||||
p0: {},
|
||||
p1: {}
|
||||
|
@ -20,7 +20,8 @@ define(
|
||||
enableGrid: false, // 吸附到网格
|
||||
enableShape: true, // 吸附到对象
|
||||
gridDelta: 5, // 网格delta
|
||||
delta: 5 // 对象delta
|
||||
delta: 5, // 对象delta
|
||||
sorptionColor: '#4AFF4A'
|
||||
},
|
||||
|
||||
// 辅助线
|
||||
|
@ -1,11 +1,3 @@
|
||||
/**
|
||||
* @file circle.js
|
||||
* @author mengke01
|
||||
* @date
|
||||
* @description
|
||||
* 圆的shape
|
||||
*/
|
||||
|
||||
define(
|
||||
function(require) {
|
||||
return [[{"x":383,"y":0},{"x":207,"y":75},{"x":75,"y":208},{"x":0,"y":384},{"x":0,"y":583},{"x":75,"y":760},{"x":207,"y":891},{"x":383,"y":966},{"x":582,"y":966},{"x":758,"y":891},{"x":890,"y":760},{"x":965,"y":583},{"x":965,"y":384},{"x":890,"y":208},{"x":758,"y":75},{"x":582,"y":0}]];
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
define(
|
||||
function(require) {
|
||||
return [[{"x":994,"y":426,"onCurve":true},{"x":1008,"y":411},{"x":1025,"y":390},{"x":1025,"y":375,"onCurve":true},{"x":1025,"y":360},{"x":1009,"y":346},{"x":988,"y":341,"onCurve":true},{"x":673,"y":311,"onCurve":true},{"x":559,"y":38,"onCurve":true},{"x":557,"y":34},{"x":550,"y":21},{"x":539,"y":9},{"x":524,"y":0},{"x":514,"y":0,"onCurve":true},{"x":495,"y":0},{"x":472,"y":23},{"x":466,"y":40,"onCurve":true},{"x":349,"y":313,"onCurve":true},{"x":34,"y":342,"onCurve":true},{"x":22,"y":344},{"x":4,"y":360},{"x":0,"y":389},{"x":17,"y":416},{"x":29,"y":427,"onCurve":true},{"x":30,"y":428},{"x":51,"y":446},{"x":83,"y":473},{"x":122,"y":507},{"x":143,"y":524,"onCurve":true},{"x":191,"y":565},{"x":251,"y":617,"onCurve":true},{"x":231,"y":697},{"x":216,"y":760,"onCurve":true},{"x":209,"y":787},{"x":196,"y":840},{"x":186,"y":884},{"x":177,"y":916},{"x":176,"y":920,"onCurve":true},{"x":174,"y":929},{"x":182,"y":946},{"x":200,"y":959},{"x":221,"y":962},{"x":231,"y":957,"onCurve":true},{"x":237,"y":955},{"x":266,"y":938},{"x":307,"y":914},{"x":357,"y":885},{"x":382,"y":871,"onCurve":true},{"x":442,"y":837},{"x":514,"y":795,"onCurve":true},{"x":780,"y":950,"onCurve":true},{"x":785,"y":952},{"x":805,"y":959},{"x":810,"y":959,"onCurve":true},{"x":825,"y":959},{"x":849,"y":945},{"x":846,"y":925,"onCurve":true},{"x":845,"y":921},{"x":839,"y":889},{"x":830,"y":844},{"x":820,"y":789},{"x":814,"y":762,"onCurve":true},{"x":801,"y":697},{"x":783,"y":616,"onCurve":true}]];
|
||||
|
@ -5,8 +5,6 @@
|
||||
* @description
|
||||
* 支持的自选形状
|
||||
*/
|
||||
|
||||
|
||||
define(
|
||||
function(require) {
|
||||
return {
|
||||
|
@ -41,7 +41,7 @@ define(
|
||||
this.commands = {};
|
||||
|
||||
var me = this;
|
||||
me.main.addEventListener('click', me['_command_click'] = function(e) {
|
||||
me['_command_click'] = function(e) {
|
||||
|
||||
var id = e.target.getAttribute('data-id');
|
||||
var superId = e.target.getAttribute('data-super');
|
||||
@ -54,7 +54,8 @@ define(
|
||||
};
|
||||
me.onClick && me.onClick(event);
|
||||
}
|
||||
} , false);
|
||||
};
|
||||
me.main.addEventListener('click', me['_command_click'], false);
|
||||
|
||||
me['_hide_click'] = function(e) {
|
||||
me.hide();
|
||||
@ -149,11 +150,11 @@ define(
|
||||
*/
|
||||
dispose: function() {
|
||||
this.hide();
|
||||
this.main.removeEventListener('click', this['_command_click'], false);
|
||||
this.container.removeEventListener('click', this['_hide_click'], false);
|
||||
this.main.removeEventListener('click', this['_command_click']);
|
||||
this.container.removeEventListener('click', this['_hide_click']);
|
||||
this['_command_click'] = this['_hide_click'] = null;
|
||||
this.main.remove();
|
||||
this.main = this.container = this.pos = null;
|
||||
this['_command_click'] = this['_hide_click'] = null;
|
||||
this.onClick = null;
|
||||
}
|
||||
});
|
||||
|
@ -33,7 +33,7 @@ define(
|
||||
History.prototype.add = function(object) {
|
||||
this.queue.splice(this.index + 1, this.maxRecord);
|
||||
this.queue.push(object);
|
||||
if(this.queue.length > this.maxRecord) {
|
||||
if (this.queue.length > this.maxRecord) {
|
||||
this.queue.shift();
|
||||
}
|
||||
this.index = this.queue.length - 1;
|
||||
@ -55,7 +55,7 @@ define(
|
||||
* @return {Object}
|
||||
*/
|
||||
History.prototype.forward = function() {
|
||||
if(this.index < this.queue.length - 1) {
|
||||
if (this.index < this.queue.length - 1) {
|
||||
this.index++;
|
||||
}
|
||||
return lang.clone(this.queue[this.index]);
|
||||
@ -67,7 +67,7 @@ define(
|
||||
* @return {Object}
|
||||
*/
|
||||
History.prototype.back = function() {
|
||||
if(this.index > 0) {
|
||||
if (this.index > 0) {
|
||||
this.index--;
|
||||
}
|
||||
return lang.clone(this.queue[this.index]);
|
||||
|
@ -24,7 +24,7 @@ define(
|
||||
var r = arr.length - 1;
|
||||
var mid;
|
||||
var axis;
|
||||
while(l <= r) {
|
||||
while (l <= r) {
|
||||
mid = (l + r) >> 1;
|
||||
axis = arr[mid].axis;
|
||||
|
||||
@ -49,8 +49,8 @@ define(
|
||||
* @param {Object} options 参数选项
|
||||
*/
|
||||
function Sorption(options) {
|
||||
this.gridDelta = options.gridDelta || 5; // 吸附检查offset
|
||||
this.delta = options.delta || 5; // 吸附检查offset
|
||||
this.gridDelta = options.gridDelta || 5; // 吸附网格 offset
|
||||
this.delta = options.delta || 5; // 吸附对象 offset
|
||||
this.enableGrid = options.enableGrid || false;
|
||||
this.enableShape = options.enableShape || true;
|
||||
}
|
||||
|
@ -305,7 +305,7 @@ define(
|
||||
*
|
||||
* @return {ArrayBuffer}
|
||||
*/
|
||||
getBuffer: function(begin, end) {
|
||||
getBuffer: function() {
|
||||
return this.view.buffer;
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user