mirror of
https://github.com/Kenshin/simpread.git
synced 2026-02-01 15:41:29 +00:00
Optimize focus.exculdeStype logic.
This commit is contained in:
parent
bfa65bae95
commit
e5e4d72af4
@ -124,14 +124,13 @@ var fcontrol = require( "controlbar" ),
|
||||
* @param {string} include: 'add' 'delete'
|
||||
*/
|
||||
function excludeStyle( $target, exclude, type ) {
|
||||
var i = 0, len = exclude.length, sel = "";
|
||||
var i = 0, len = exclude.length, sel = "", tags = [], tag = "";
|
||||
for ( i; i < len; i++ ) {
|
||||
tag = getSelector( exclude[i] );
|
||||
if ( tag ) {
|
||||
if ( type == "delete" ) $target.find( tag ).hide();
|
||||
else if ( type == "add" ) $target.find( tag ).show();
|
||||
}
|
||||
if ( tag ) tags.push( tag )
|
||||
}
|
||||
if ( type == "delete" ) $target.find( tags.join(",") ).hide();
|
||||
else if ( type == "add" ) $target.find( tags.join(",") ).show();
|
||||
}
|
||||
|
||||
return new Focus();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user