Add ve.log, ve.debug and change rendering animation debug effect used in TextNode.

This commit is contained in:
Inez Korczynski 2012-06-14 15:00:29 -07:00
parent ee475cc54a
commit 7ab079bc52
2 changed files with 14 additions and 2 deletions

View file

@ -131,8 +131,12 @@ ve.ce.TextNode.prototype.onUpdate = function( force ) {
this.$ = $new;
if ( this.parent ) {
this.parent.clean();
// TODO: Remove before release or make it some debug variable dependent
//this.parent.$.css('display','none').fadeIn( 'fast' );
if ( ve.debug ) {
this.parent.$.css('background-color', '#F6F6F6');
setTimeout( ve.proxy( function() {
this.parent.$.css('background-color', 'transparent');
}, this ), 350 );
}
}
}
};

View file

@ -276,3 +276,11 @@ ve.batchSplice = function( arr, offset, remove, data ) {
ve.insertIntoArray = function( dst, offset, src ) {
ve.batchSplice( dst, offset, 0, src );
};
ve.debug = true;
ve.log = function() {
if ( ve.debug === true && window.console ) {
console.log.apply( console, arguments );
}
};