Commit d0599807 authored by techird's avatar techird

dist

parent 305375af
...@@ -802,7 +802,9 @@ Utils.extend( KityMinder, { ...@@ -802,7 +802,9 @@ Utils.extend( KityMinder, {
return KityMinder._protocals[ name ] || null; return KityMinder._protocals[ name ] || null;
}, },
getSupportedProtocals: function () { getSupportedProtocals: function () {
return Utils.keys( KityMinder._protocals ); return Utils.keys( KityMinder._protocals ).sort(function(a, b) {
return KityMinder._protocals[b].recognizePriority - KityMinder._protocals[a].recognizePriority;
});
}, },
getAllRegisteredProtocals: function () { getAllRegisteredProtocals: function () {
return KityMinder._protocals; return KityMinder._protocals;
...@@ -1357,6 +1359,18 @@ KityMinder.Geometry = ( function () { ...@@ -1357,6 +1359,18 @@ KityMinder.Geometry = ( function () {
return unknown; return unknown;
}; };
g.expandBox = function( box, sizeX, sizeY ) {
if(sizeY === undefined) {
sizeY = sizeX;
}
return wrapBox( {
left: box.left - sizeX,
top: box.top - sizeY,
right: box.right + sizeX,
bottom: box.bottom + sizeY
} );
};
return g; return g;
} )(); } )();
...@@ -6552,7 +6566,8 @@ KityMinder.registerProtocal( "plain", function () { ...@@ -6552,7 +6566,8 @@ KityMinder.registerProtocal( "plain", function () {
} }
return decode( local ); return decode( local );
}, },
recognize: recognize recognize: recognize,
recognizePriority: -1
}; };
} ); } );
...@@ -6574,7 +6589,8 @@ KityMinder.registerProtocal( 'json', function () { ...@@ -6574,7 +6589,8 @@ KityMinder.registerProtocal( 'json', function () {
}, },
recognize: function ( local ) { recognize: function ( local ) {
return Utils.isString( local ) && local.charAt( 0 ) == '{' && local.charAt( local.length - 1 ) == '}'; return Utils.isString( local ) && local.charAt( 0 ) == '{' && local.charAt( local.length - 1 ) == '}';
} },
recognizePriority: 0
}; };
} ); } );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment