From 16c36891912627894805718080ac32edf1d527d4 Mon Sep 17 00:00:00 2001 From: prrashi Date: Mon, 25 Apr 2016 10:51:57 -0400 Subject: [PATCH] Setting RatedFill when ever rating is set --- min/jquery.rateyo.min.js | 2 +- min/jquery.rateyo.min.js.map | 2 +- src/jquery.rateyo.js | 9 +-------- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/min/jquery.rateyo.min.js b/min/jquery.rateyo.min.js index 4d25b84..efc08a2 100644 --- a/min/jquery.rateyo.min.js +++ b/min/jquery.rateyo.min.js @@ -1,4 +1,4 @@ /*rateYo V2.1.1, A simple and flexible star rating plugin prashanth pamidi (https://github.com/prrashi)*/ -!function(a){"use strict";function b(a,b,c){return a===b?a=b:a===c&&(a=c),a}function c(a,b,c){var d=a>=b&&c>=a;if(!d)throw Error("Invalid Rating, expected value between "+b+" and "+c);return a}function d(a){return"undefined"!=typeof a}function e(a,b,c){var d=(b-a)*(c/100);return d=Math.round(a+d).toString(16),1===d.length&&(d="0"+d),d}function f(a,b,c){if(!a||!b)return null;c=d(c)?c:0,a=p(a),b=p(b);var f=e(a.r,b.r,c),g=e(a.b,b.b,c),h=e(a.g,b.g,c);return"#"+f+h+g}function g(e,h){function j(a){d(a)||(a=h.rating),X=a;var b=a/N,c=b*P;b>1&&(c+=(Math.ceil(b)-1)*R),h.multiColor&&q(),V.css("width",c+"%")}function k(){S=O*h.numStars+Q*(h.numStars-1),P=O/S*100,R=Q/S*100,e.width(S),j()}function m(a){var b=h.starWidth=a;return O=window.parseFloat(h.starWidth.replace("px","")),U.find("svg").attr({width:h.starWidth,height:b}),V.find("svg").attr({width:h.starWidth,height:b}),k(),e}function o(a){return h.spacing=a,Q=parseFloat(h.spacing.replace("px","")),U.find("svg:not(:first-child)").css({"margin-left":a}),V.find("svg:not(:first-child)").css({"margin-left":a}),k(),e}function p(a){return h.normalFill=a,U.find("svg").attr({fill:h.normalFill}),e}function q(a){if(h.multiColor){var b=X-W,c=b/h.maxValue*100,d=h.multiColor||{},g=d.startColor||n.startColor,i=d.endColor||n.endColor;a=f(g,i,c)}else Z=a;return h.ratedFill=a,V.find("svg").attr({fill:h.ratedFill}),e}function r(a){h.multiColor=a,q(a?a:Z)}function s(b){h.numStars=b,N=h.maxValue/h.numStars,U.empty(),V.empty();for(var c=0;ca&&A(a),j(),e}function u(a){return h.precision=a,A(h.rating),e}function v(a){return h.halfStar=a,e}function w(a){return h.fullStar=a,e}function x(a){var b=a%N,c=N/2,d=h.halfStar,e=h.fullStar;return e||d?(e||d&&b>c?a+=N-b:(a-=b,b>0&&(a+=c)),a):a}function y(a){var b=U.offset(),c=b.left,d=c+U.width(),e=h.maxValue,f=a.pageX,g=0;if(c>f)g=W;else if(f>d)g=e;else{var i=(f-c)/(d-c);if(Q>0){i*=100;for(var j=i;j>0;)j>P?(g+=N,j-=P+R):(g+=j/P*N,j=0)}else g=i*h.maxValue;g=x(g)}return g}function z(a){return h.readOnly=a,e.attr("readonly",!0),L(),a||(e.removeAttr("readonly"),K()),e}function A(a){var d=a,f=h.maxValue;return"string"==typeof d&&("%"===d[d.length-1]&&(d=d.substr(0,d.length-1),f=100,t(f)),d=parseFloat(d)),c(d,W,f),d=parseFloat(d.toFixed(h.precision)),b(parseFloat(d),W,f),h.rating=d,j(),Y&&e.trigger("rateyo.set",{rating:d}),e}function B(a){return h.onInit=a,e}function C(a){return h.onSet=a,e}function D(a){return h.onChange=a,e}function E(a){var c=y(a).toFixed(h.precision),d=h.maxValue;c=b(parseFloat(c),W,d),j(c),e.trigger("rateyo.change",{rating:c})}function F(){j(),e.trigger("rateyo.change",{rating:h.rating})}function G(a){var b=y(a).toFixed(h.precision);b=parseFloat(b),M.rating(b)}function H(a,b){h.onInit&&"function"==typeof h.onInit&&h.onInit.apply(this,[b.rating,M])}function I(a,b){h.onChange&&"function"==typeof h.onChange&&h.onChange.apply(this,[b.rating,M])}function J(a,b){h.onSet&&"function"==typeof h.onSet&&h.onSet.apply(this,[b.rating,M])}function K(){e.on("mousemove",E).on("mouseenter",E).on("mouseleave",F).on("click",G).on("rateyo.init",H).on("rateyo.change",I).on("rateyo.set",J)}function L(){e.off("mousemove",E).off("mouseenter",E).off("mouseleave",F).off("click",G).off("rateyo.init",H).off("rateyo.change",I).off("rateyo.set",J)}this.node=e.get(0);var M=this;e.empty().addClass("jq-ry-container");var N,O,P,Q,R,S,T=a("
").addClass("jq-ry-group-wrapper").appendTo(e),U=a("
").addClass("jq-ry-normal-group").addClass("jq-ry-group").appendTo(T),V=a("
").addClass("jq-ry-rated-group").addClass("jq-ry-group").appendTo(T),W=0,X=h.rating,Y=!1,Z=h.ratedFill;this.rating=function(a){return d(a)?(A(a),e):h.rating},this.destroy=function(){return h.readOnly||L(),g.prototype.collection=i(e.get(0),this.collection),e.removeClass("jq-ry-container").children().remove(),e},this.method=function(a){if(!a)throw Error("Method name not specified!");if(!d(this[a]))throw Error("Method "+a+" doesn't exist!");var b=Array.prototype.slice.apply(arguments,[]),c=b.slice(1),e=this[a];return e.apply(this,c)},this.option=function(a,b){if(!d(a))return h;var c;switch(a){case"starWidth":c=m;break;case"numStars":c=s;break;case"normalFill":c=p;break;case"ratedFill":c=q;break;case"multiColor":c=r;break;case"maxValue":c=t;break;case"precision":c=u;break;case"rating":c=A;break;case"halfStar":c=v;break;case"fullStar":c=w;break;case"readOnly":c=z;break;case"spacing":c=o;break;case"onInit":c=B;break;case"onSet":c=C;break;case"onChange":c=D;break;default:throw Error("No such option as "+a)}return d(b)?c(b):h[a]},s(h.numStars),z(h.readOnly),this.collection.push(this),this.rating(h.rating,!0),Y=!0,e.trigger("rateyo.init",{rating:h.rating})}function h(b,c){var d;return a.each(c,function(){return b===this.node?(d=this,!1):void 0}),d}function i(b,c){return a.each(c,function(a){if(b===this.node){var d=c.slice(0,a),e=c.slice(a+1,c.length);return c=d.concat(e),!1}}),c}function j(b){var c=g.prototype.collection,d=a(this);if(0===d.length)return d;var e=Array.prototype.slice.apply(arguments,[]);if(0===e.length)b=e[0]={};else{if(1!==e.length||"object"!=typeof e[0]){if(e.length>=1&&"string"==typeof e[0]){var f=e[0],i=e.slice(1),j=[];return a.each(d,function(a,b){var d=h(b,c);if(!d)throw Error("Trying to set options before even initialization");var e=d[f];if(!e)throw Error("Method "+f+" does not exist!");var g=e.apply(d,i);j.push(g)}),j=1===j.length?j[0]:j}throw Error("Invalid Arguments")}b=e[0]}return b=a.extend({},m,b),a.each(d,function(){var d=h(this,c);return d?void 0:new g(a(this),a.extend({},b))})}function k(){return j.apply(this,Array.prototype.slice.apply(arguments,[]))}var l='',m={starWidth:"32px",normalFill:"gray",ratedFill:"#f39c12",numStars:5,maxValue:5,precision:1,rating:0,fullStar:!1,halfStar:!1,readOnly:!1,spacing:"0px",multiColor:null,onInit:null,onChange:null,onSet:null},n={startColor:"#c0392b",endColor:"#f1c40f"},o=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,p=function(a){if(!o.test(a))return null;var b=o.exec(a),c=parseInt(b[1],16),d=parseInt(b[2],16),e=parseInt(b[3],16);return{r:c,g:d,b:e}};g.prototype.collection=[],window.RateYo=g,a.fn.rateYo=k}(window.jQuery); +!function(a){"use strict";function b(a,b,c){return a===b?a=b:a===c&&(a=c),a}function c(a,b,c){var d=a>=b&&c>=a;if(!d)throw Error("Invalid Rating, expected value between "+b+" and "+c);return a}function d(a){return"undefined"!=typeof a}function e(a,b,c){var d=(b-a)*(c/100);return d=Math.round(a+d).toString(16),1===d.length&&(d="0"+d),d}function f(a,b,c){if(!a||!b)return null;c=d(c)?c:0,a=p(a),b=p(b);var f=e(a.r,b.r,c),g=e(a.b,b.b,c),h=e(a.g,b.g,c);return"#"+f+h+g}function g(e,h){function j(a){d(a)||(a=h.rating),X=a;var b=a/N,c=b*P;b>1&&(c+=(Math.ceil(b)-1)*R),q(h.ratedFill),V.css("width",c+"%")}function k(){S=O*h.numStars+Q*(h.numStars-1),P=O/S*100,R=Q/S*100,e.width(S),j()}function m(a){var b=h.starWidth=a;return O=window.parseFloat(h.starWidth.replace("px","")),U.find("svg").attr({width:h.starWidth,height:b}),V.find("svg").attr({width:h.starWidth,height:b}),k(),e}function o(a){return h.spacing=a,Q=parseFloat(h.spacing.replace("px","")),U.find("svg:not(:first-child)").css({"margin-left":a}),V.find("svg:not(:first-child)").css({"margin-left":a}),k(),e}function p(a){return h.normalFill=a,U.find("svg").attr({fill:h.normalFill}),e}function q(a){if(h.multiColor){var b=X-W,c=b/h.maxValue*100,d=h.multiColor||{},g=d.startColor||n.startColor,i=d.endColor||n.endColor;a=f(g,i,c)}else Z=a;return h.ratedFill=a,V.find("svg").attr({fill:h.ratedFill}),e}function r(a){h.multiColor=a,q(a?a:Z)}function s(b){h.numStars=b,N=h.maxValue/h.numStars,U.empty(),V.empty();for(var c=0;ca&&A(a),j(),e}function u(a){return h.precision=a,A(h.rating),e}function v(a){return h.halfStar=a,e}function w(a){return h.fullStar=a,e}function x(a){var b=a%N,c=N/2,d=h.halfStar,e=h.fullStar;return e||d?(e||d&&b>c?a+=N-b:(a-=b,b>0&&(a+=c)),a):a}function y(a){var b=U.offset(),c=b.left,d=c+U.width(),e=h.maxValue,f=a.pageX,g=0;if(c>f)g=W;else if(f>d)g=e;else{var i=(f-c)/(d-c);if(Q>0){i*=100;for(var j=i;j>0;)j>P?(g+=N,j-=P+R):(g+=j/P*N,j=0)}else g=i*h.maxValue;g=x(g)}return g}function z(a){return h.readOnly=a,e.attr("readonly",!0),L(),a||(e.removeAttr("readonly"),K()),e}function A(a){var d=a,f=h.maxValue;return"string"==typeof d&&("%"===d[d.length-1]&&(d=d.substr(0,d.length-1),f=100,t(f)),d=parseFloat(d)),c(d,W,f),d=parseFloat(d.toFixed(h.precision)),b(parseFloat(d),W,f),h.rating=d,j(),Y&&e.trigger("rateyo.set",{rating:d}),e}function B(a){return h.onInit=a,e}function C(a){return h.onSet=a,e}function D(a){return h.onChange=a,e}function E(a){var c=y(a).toFixed(h.precision),d=h.maxValue;c=b(parseFloat(c),W,d),j(c),e.trigger("rateyo.change",{rating:c})}function F(){j(),e.trigger("rateyo.change",{rating:h.rating})}function G(a){var b=y(a).toFixed(h.precision);b=parseFloat(b),M.rating(b)}function H(a,b){h.onInit&&"function"==typeof h.onInit&&h.onInit.apply(this,[b.rating,M])}function I(a,b){h.onChange&&"function"==typeof h.onChange&&h.onChange.apply(this,[b.rating,M])}function J(a,b){h.onSet&&"function"==typeof h.onSet&&h.onSet.apply(this,[b.rating,M])}function K(){e.on("mousemove",E).on("mouseenter",E).on("mouseleave",F).on("click",G).on("rateyo.init",H).on("rateyo.change",I).on("rateyo.set",J)}function L(){e.off("mousemove",E).off("mouseenter",E).off("mouseleave",F).off("click",G).off("rateyo.init",H).off("rateyo.change",I).off("rateyo.set",J)}this.node=e.get(0);var M=this;e.empty().addClass("jq-ry-container");var N,O,P,Q,R,S,T=a("
").addClass("jq-ry-group-wrapper").appendTo(e),U=a("
").addClass("jq-ry-normal-group").addClass("jq-ry-group").appendTo(T),V=a("
").addClass("jq-ry-rated-group").addClass("jq-ry-group").appendTo(T),W=0,X=h.rating,Y=!1,Z=h.ratedFill;this.rating=function(a){return d(a)?(A(a),e):h.rating},this.destroy=function(){return h.readOnly||L(),g.prototype.collection=i(e.get(0),this.collection),e.removeClass("jq-ry-container").children().remove(),e},this.method=function(a){if(!a)throw Error("Method name not specified!");if(!d(this[a]))throw Error("Method "+a+" doesn't exist!");var b=Array.prototype.slice.apply(arguments,[]),c=b.slice(1),e=this[a];return e.apply(this,c)},this.option=function(a,b){if(!d(a))return h;var c;switch(a){case"starWidth":c=m;break;case"numStars":c=s;break;case"normalFill":c=p;break;case"ratedFill":c=q;break;case"multiColor":c=r;break;case"maxValue":c=t;break;case"precision":c=u;break;case"rating":c=A;break;case"halfStar":c=v;break;case"fullStar":c=w;break;case"readOnly":c=z;break;case"spacing":c=o;break;case"onInit":c=B;break;case"onSet":c=C;break;case"onChange":c=D;break;default:throw Error("No such option as "+a)}return d(b)?c(b):h[a]},s(h.numStars),z(h.readOnly),this.collection.push(this),this.rating(h.rating,!0),Y=!0,e.trigger("rateyo.init",{rating:h.rating})}function h(b,c){var d;return a.each(c,function(){return b===this.node?(d=this,!1):void 0}),d}function i(b,c){return a.each(c,function(a){if(b===this.node){var d=c.slice(0,a),e=c.slice(a+1,c.length);return c=d.concat(e),!1}}),c}function j(b){var c=g.prototype.collection,d=a(this);if(0===d.length)return d;var e=Array.prototype.slice.apply(arguments,[]);if(0===e.length)b=e[0]={};else{if(1!==e.length||"object"!=typeof e[0]){if(e.length>=1&&"string"==typeof e[0]){var f=e[0],i=e.slice(1),j=[];return a.each(d,function(a,b){var d=h(b,c);if(!d)throw Error("Trying to set options before even initialization");var e=d[f];if(!e)throw Error("Method "+f+" does not exist!");var g=e.apply(d,i);j.push(g)}),j=1===j.length?j[0]:j}throw Error("Invalid Arguments")}b=e[0]}return b=a.extend({},m,b),a.each(d,function(){var d=h(this,c);return d?void 0:new g(a(this),a.extend({},b))})}function k(){return j.apply(this,Array.prototype.slice.apply(arguments,[]))}var l='',m={starWidth:"32px",normalFill:"gray",ratedFill:"#f39c12",numStars:5,maxValue:5,precision:1,rating:0,fullStar:!1,halfStar:!1,readOnly:!1,spacing:"0px",multiColor:null,onInit:null,onChange:null,onSet:null},n={startColor:"#c0392b",endColor:"#f1c40f"},o=/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i,p=function(a){if(!o.test(a))return null;var b=o.exec(a),c=parseInt(b[1],16),d=parseInt(b[2],16),e=parseInt(b[3],16);return{r:c,g:d,b:e}};g.prototype.collection=[],window.RateYo=g,a.fn.rateYo=k}(window.jQuery); //# sourceMappingURL=jquery.rateyo.min.js.map \ No newline at end of file diff --git a/min/jquery.rateyo.min.js.map b/min/jquery.rateyo.min.js.map index b9c72a4..063645f 100644 --- a/min/jquery.rateyo.min.js.map +++ b/min/jquery.rateyo.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/jquery.rateyo.js"],"names":["$","checkPrecision","value","minValue","maxValue","checkBounds","isValid","Error","isDefined","getChannelValue","startVal","endVal","percent","newVal","Math","round","toString","length","getColor","startColor","endColor","hexToRGB","r","b","g","RateYo","$node","options","showRating","ratingVal","rating","currentRating","numStarsToShow","step","percentOfStar","ceil","percentOfSpacing","multiColor","setRatedFill","$ratedGroup","css","setContainerWidth","containerWidth","starWidth","numStars","spacing","width","setStarWidth","newWidth","starHeight","window","parseFloat","replace","$normalGroup","find","attr","height","setSpacing","newSpacing","margin-left","setNormalFill","newFill","normalFill","fill","ratingDiff","percentCovered","colorOpts","MULTICOLOR_OPTIONS","ratedFill","setMultiColor","colorOptions","setNumStars","newValue","empty","i","append","BASICSTAR","setMaxValue","setRating","setPrecision","precision","setHalfStar","halfStar","setFullStar","fullStar","remainder","halfStep","isHalfStar","isFullStar","calculateRating","e","position","offset","nodeStartX","left","nodeEndX","pageX","calculatedRating","calcPrcnt","remPrcnt","setReadOnly","readOnly","unbindEvents","removeAttr","bindEvents","substr","toFixed","isInitialized","trigger","setOnInit","method","onInit","setOnSet","onSet","setOnChange","onChange","onMouseEnter","onMouseLeave","onMouseClick","resultantRating","that","data","apply","this","on","off","node","get","addClass","$groupWrapper","appendTo","destroy","prototype","collection","deleteInstance","removeClass","children","remove","methodName","args","Array","slice","arguments","params","option","optionName","param","push","getInstance","instance","each","index","firstPart","secondPart","concat","_rateYo","rateYoInstances","$nodes","result","existingInstance","returnVal","extend","DEFAULTS","rateYo","hexRegex","hex","test","hexValues","exec","parseInt","fn","jQuery"],"mappings":";;CAME,SAAUA,GACV,YA4CA,SAASC,GAAgBC,EAAOC,EAAUC,GAgBxC,MATIF,KAAUC,EAEZD,EAAQC,EAEFD,IAAUE,IAEhBF,EAAQE,GAGHF,EAGT,QAASG,GAAaH,EAAOC,EAAUC,GAMrC,GAAIE,GAAUJ,GAASC,GAAqBC,GAATF,CAEnC,KAAII,EAEA,KAAMC,OAAM,0CAA2CJ,EAC3C,QAAUC,EAG1B,OAAOF,GAGT,QAASM,GAAUN,GAGjB,MAAwB,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BX,EAAYzB,KAAMiC,EAEzC,OAAKG,GAAL,OAES,GAAItI,GAAOzB,EAAE2H,MAAO3H,EAAEiK,UAAWtI,MAKvD,QAASwI,KAGP,MAAOR,GAAQjC,MAAMC,KAAMiB,MAAMR,UAAUS,MAAMnB,MAAMoB,eA5hCzD,GAAIlE,GAAY,gVAeZsF,GAEFvH,UAAY,OACZmB,WAAY,OACZM,UAAY,UACZxB,SAAY,EACZxC,SAAY,EACZ4E,UAAY,EACZlD,OAAY,EACZsD,UAAY,EACZF,UAAY,EACZmB,UAAY,EACZxD,QAAY,MACZR,WAAY,KACZ0E,OAAY,KACZI,SAAY,KACZF,MAAY,MAIV9C,GAEFhD,WAAY,UACZC,SAAY,WA8CVgJ,EAAW,8CAEX/I,EAAW,SAAUgJ,GAOvB,IAAKD,EAASE,KAAKD,GAEjB,MAAO,KAGT,IAAIE,GAAYH,EAASI,KAAKH,GACjC/I,EAAImJ,SAASF,EAAU,GAAI,IAC3B/I,EAAIiJ,SAASF,EAAU,GAAI,IAC3BhJ,EAAIkJ,SAASF,EAAU,GAAI,GAExB,QAAQjJ,EAAEA,EAAGE,EAAEA,EAAGD,EAAEA,GA6yBtBE,GAAO2G,UAAUC,cA2IjBnF,OAAOzB,OAASA,EAChBzB,EAAE0K,GAAGP,OAASA,GAEdjH,OAAOyH","file":"jquery.rateyo.min.js"} \ No newline at end of file +{"version":3,"sources":["../src/jquery.rateyo.js"],"names":["$","checkPrecision","value","minValue","maxValue","checkBounds","isValid","Error","isDefined","getChannelValue","startVal","endVal","percent","newVal","Math","round","toString","length","getColor","startColor","endColor","hexToRGB","r","b","g","RateYo","$node","options","showRating","ratingVal","rating","currentRating","numStarsToShow","step","percentOfStar","ceil","percentOfSpacing","setRatedFill","ratedFill","$ratedGroup","css","setContainerWidth","containerWidth","starWidth","numStars","spacing","width","setStarWidth","newWidth","starHeight","window","parseFloat","replace","$normalGroup","find","attr","height","setSpacing","newSpacing","margin-left","setNormalFill","newFill","normalFill","fill","multiColor","ratingDiff","percentCovered","colorOpts","MULTICOLOR_OPTIONS","setMultiColor","colorOptions","setNumStars","newValue","empty","i","append","BASICSTAR","setMaxValue","setRating","setPrecision","precision","setHalfStar","halfStar","setFullStar","fullStar","remainder","halfStep","isHalfStar","isFullStar","calculateRating","e","position","offset","nodeStartX","left","nodeEndX","pageX","calculatedRating","calcPrcnt","remPrcnt","setReadOnly","readOnly","unbindEvents","removeAttr","bindEvents","substr","toFixed","isInitialized","trigger","setOnInit","method","onInit","setOnSet","onSet","setOnChange","onChange","onMouseEnter","onMouseLeave","onMouseClick","resultantRating","that","data","apply","this","on","off","node","get","addClass","$groupWrapper","appendTo","destroy","prototype","collection","deleteInstance","removeClass","children","remove","methodName","args","Array","slice","arguments","params","option","optionName","param","push","getInstance","instance","each","index","firstPart","secondPart","concat","_rateYo","rateYoInstances","$nodes","result","existingInstance","returnVal","extend","DEFAULTS","rateYo","hexRegex","hex","test","hexValues","exec","parseInt","fn","jQuery"],"mappings":";;CAME,SAAUA,GACV,YA4CA,SAASC,GAAgBC,EAAOC,EAAUC,GAgBxC,MATIF,KAAUC,EAEZD,EAAQC,EAEFD,IAAUE,IAEhBF,EAAQE,GAGHF,EAGT,QAASG,GAAaH,EAAOC,EAAUC,GAMrC,GAAIE,GAAUJ,GAASC,GAAqBC,GAATF,CAEnC,KAAII,EAEA,KAAMC,OAAM,0CAA2CJ,EAC3C,QAAUC,EAG1B,OAAOF,GAGT,QAASM,GAAUN,GAGjB,MAAwB,mBAAVA,GA0BhB,QAASO,GAAgBC,EAAUC,EAAQC,GAMzC,GAAIC,IAAUF,EAASD,IAAWE,EAAQ,IAS1C,OAPAC,GAASC,KAAKC,MAAML,EAAWG,GAAQG,SAAS,IAE1B,IAAlBH,EAAOI,SAEdJ,EAAS,IAAMA,GAGLA,EAGT,QAASK,GAAUC,EAAYC,EAAUR,GAQvC,IAAKO,IAAeC,EAElB,MAAO,KAGTR,GAAUJ,EAAUI,GAAUA,EAAU,EAExCO,EAAaE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,UAAY,EACZF,UAAY,EACZmB,UAAY,EACZxD,QAAY,MACZmB,WAAY,KACZ+C,OAAY,KACZI,SAAY,KACZF,MAAY,MAIV7C,GAEFjD,WAAY,UACZC,SAAY,WA8CVgJ,EAAW,8CAEX/I,EAAW,SAAUgJ,GAOvB,IAAKD,EAASE,KAAKD,GAEjB,MAAO,KAGT,IAAIE,GAAYH,EAASI,KAAKH,GACjC/I,EAAImJ,SAASF,EAAU,GAAI,IAC3B/I,EAAIiJ,SAASF,EAAU,GAAI,IAC3BhJ,EAAIkJ,SAASF,EAAU,GAAI,GAExB,QAAQjJ,EAAEA,EAAGE,EAAEA,EAAGD,EAAEA,GAsyBtBE,GAAO2G,UAAUC,cA2IjBnF,OAAOzB,OAASA,EAChBzB,EAAE0K,GAAGP,OAASA,GAEdjH,OAAOyH","file":"jquery.rateyo.min.js"} \ No newline at end of file diff --git a/src/jquery.rateyo.js b/src/jquery.rateyo.js index c8a0fd5..8adc518 100644 --- a/src/jquery.rateyo.js +++ b/src/jquery.rateyo.js @@ -248,14 +248,7 @@ percent += (Math.ceil(numStarsToShow) - 1)*percentOfSpacing; } - if (options.multiColor) { - - /* - * If multiColor rating, the color of the rating should be changed - * according the rating value - */ - setRatedFill(); - } + setRatedFill(options.ratedFill); $ratedGroup.css("width", percent + "%"); }