Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit730446e

Browse files
committed
Effects: Update jquery-color.
1 parent7ce3069 commit730446e

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

‎ui/.jshintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"boss":true,
32
"browser":true,
43
"curly":true,
54
"eqnull":true,

‎ui/jquery.ui.effect.js

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $.effects = {
2121
* jQuery Color Animations
2222
* http://jquery.org/
2323
*
24-
* Copyright2011 John Resig
24+
* Copyright2012 John Resig
2525
* Dual licensed under the MIT or GPL Version 2 licenses.
2626
* http://jquery.org/license
2727
*/
@@ -149,7 +149,6 @@ var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightCo
149149
floor:true
150150
}
151151
},
152-
rgbaspace=spaces.rgba.props,
153152
support=color.support={},
154153

155154
// colors = jQuery.Color.names
@@ -158,11 +157,11 @@ var stepHooks = "backgroundColor borderBottomColor borderLeftColor borderRightCo
158157
// local aliases of functions called often
159158
each=jQuery.each;
160159

161-
spaces.hsla.props.alpha=rgbaspace.alpha;
160+
spaces.hsla.props.alpha=spaces.rgba.props.alpha;
162161

163162
functionclamp(value,prop,alwaysAllowEmpty){
164163
vartype=propTypes[prop.type]||{},
165-
allowEmpty=prop.empty||alwaysAllowEmpty;
164+
allowEmpty=alwaysAllowEmpty||prop.empty;
166165

167166
if(allowEmpty&&value==null){
168167
returnnull;
@@ -179,7 +178,7 @@ function clamp( value, prop, alwaysAllowEmpty ) {
179178
returnprop.def;
180179
}
181180
if(type.mod){
182-
value=value%type.mod;
181+
value%=type.mod;
183182
// -10 -> 350
184183
returnvalue<0 ?type.mod+value :value;
185184
}
@@ -226,21 +225,18 @@ function stringParse( string ) {
226225
returninst;
227226
}
228227

229-
// named colors / default - filter back through parse function
230-
if(string=colors[string]){
231-
returnstring;
232-
}
228+
// named colors
229+
returncolors[string];
233230
}
234231

235-
color.fn=color.prototype={
236-
constructor:color,
232+
color.fn=jQuery.extend(color.prototype,{
237233
parse:function(red,green,blue,alpha){
238234
if(red===undefined){
239235
this._rgba=[null,null,null,null];
240236
returnthis;
241237
}
242-
if(redinstanceofjQuery||red.nodeType){
243-
red=redinstanceofjQuery ?red.css(green) :jQuery(red).css(green);
238+
if(red.jquery||red.nodeType){
239+
red=jQuery(red).css(green);
244240
green=undefined;
245241
}
246242

@@ -260,7 +256,7 @@ color.fn = color.prototype = {
260256
}
261257

262258
if(type==="array"){
263-
each(rgbaspace,function(key,prop){
259+
each(spaces.rgba.props,function(key,prop){
264260
rgba[prop.idx]=clamp(red[prop.idx],prop);
265261
});
266262
returnthis;
@@ -428,7 +424,7 @@ color.fn = color.prototype = {
428424
toString:function(){
429425
returnthis._rgba[3]===0 ?"transparent" :this.toRgbaString();
430426
}
431-
};
427+
});
432428
color.fn.parse.prototype=color.fn;
433429

434430
// hsla conversions adapted from:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp