mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-15 02:23:58 +00:00
Add ve.log, ve.debug and change rendering animation debug effect used in TextNode.
This commit is contained in:
parent
ee475cc54a
commit
7ab079bc52
|
@ -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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue