@@ -357,7 +357,7 @@ wheelnav.prototype.navigateWheel = function (clicked) {
357
357
else {
358
358
this . marker . setCurrentTransform ( ) ;
359
359
}
360
- this . spreader . setCurrentTransform ( ) ;
360
+ this . spreader . setCurrentTransform ( true ) ;
361
361
}
362
362
} ;
363
363
@@ -530,8 +530,8 @@ wheelnav.prototype.parseWheel = function (holderDiv) {
530
530
this . markerPathFunction = markerPath ( ) [ wheelnavMarkerPath ] ;
531
531
}
532
532
}
533
- //data-wheelnav-onlyinit
534
- var wheelnavOnlyinit = holderDiv . getAttribute ( "data-wheelnav-onlyinit " ) ;
533
+ //data-wheelnav-init
534
+ var wheelnavOnlyinit = holderDiv . getAttribute ( "data-wheelnav-init " ) ;
535
535
if ( wheelnavOnlyinit !== null ) {
536
536
onlyInit = true ;
537
537
}
@@ -671,15 +671,16 @@ wheelnavItem = function (wheelnav, title, itemIndex) {
671
671
this . animateeffect = "bounce" ;
672
672
this . animatetime = 1500 ;
673
673
this . sliceAngle = 360 / wheelnav . navItemCount ;
674
-
674
+
675
+ this . navigateHref = null ;
676
+ this . navigateFunction = null ;
677
+
678
+ //Navitem styles
675
679
this . styleNavItem ( ) ;
676
680
677
681
//Wheelnav settings
678
682
this . setWheelSettings ( ) ;
679
683
680
- this . navigateHref = null ;
681
- this . navigateFunction = null ;
682
-
683
684
return this ;
684
685
} ;
685
686
@@ -889,7 +890,7 @@ wheelnavItem.prototype.hoverEffect = function (hovered, isEnter) {
889
890
}
890
891
891
892
this . wheelnav . marker . setCurrentTransform ( ) ;
892
- this . wheelnav . spreader . setCurrentTransform ( ) ;
893
+ this . wheelnav . spreader . setCurrentTransform ( true ) ;
893
894
}
894
895
} ;
895
896
@@ -2009,16 +2010,28 @@ spreader = function (wheelnav) {
2009
2010
if ( wheelnavTitle ( ) . isPathTitle ( this . wheelnav . spreaderOutTitle ) ) {
2010
2011
outTitle = new wheelnavTitle ( this . wheelnav . spreaderOutTitle , this . wheelnav . raphael . raphael ) ;
2011
2012
this . outTitle = outTitle . getTitlePercentAttr ( this . spreaderPathOut . titlePosX , this . spreaderPathOut . titlePosY ) ;
2012
- this . spreaderTitle = thisWheelNav . raphael . path ( this . outTitle . path ) ;
2013
2013
}
2014
2014
else {
2015
2015
outTitle = new wheelnavTitle ( this . wheelnav . spreaderOutTitle ) ;
2016
2016
this . outTitle = outTitle . getTitlePercentAttr ( this . spreaderPathOut . titlePosX , this . spreaderPathOut . titlePosY ) ;
2017
- this . spreaderTitle = thisWheelNav . raphael . text ( currentPath . titlePosX , currentPath . titlePosY , this . outTitle . title ) ;
2018
2017
}
2019
2018
2019
+ var currentTitle = this . outTitle ;
2020
+ var currentTitleAttr = this . wheelnav . spreaderTitleOutAttr ;
2021
+ if ( thisWheelNav . initPercent < thisWheelNav . maxPercent ) {
2022
+ currentTitle = this . inTitle ;
2023
+ currentTitleAttr = this . wheelnav . spreaderTitleInAttr ;
2024
+ }
2025
+
2026
+ if ( wheelnavTitle ( ) . isPathTitle ( this . wheelnav . spreaderOutTitle ) ) {
2027
+ this . spreaderTitle = thisWheelNav . raphael . path ( currentTitle . path ) ;
2028
+ }
2029
+ else {
2030
+ this . spreaderTitle = thisWheelNav . raphael . text ( currentPath . titlePosX , currentPath . titlePosY , currentTitle . title ) ;
2031
+ }
2032
+
2020
2033
this . spreaderTitle . attr ( this . fontAttr ) ;
2021
- this . spreaderTitle . attr ( thisWheelNav . spreaderOnAttr ) ;
2034
+ this . spreaderTitle . attr ( currentTitleAttr ) ;
2022
2035
this . spreaderTitle . id = thisWheelNav . getSpreaderTitleId ( ) ;
2023
2036
this . spreaderTitle . node . id = this . spreaderTitle . id ;
2024
2037
this . spreaderTitle . click ( function ( ) {
@@ -2031,60 +2044,62 @@ spreader = function (wheelnav) {
2031
2044
return this ;
2032
2045
} ;
2033
2046
2034
- spreader . prototype . setCurrentTransform = function ( ) {
2047
+ spreader . prototype . setCurrentTransform = function ( withoutAnimate ) {
2035
2048
if ( this . wheelnav . spreaderEnable ) {
2036
- this . spreaderPath . toFront ( ) ;
2037
-
2038
2049
2039
- if ( this . wheelnav . currentPercent > this . wheelnav . minPercent ) {
2040
- currentPath = this . spreaderPathOut . spreaderPathString ;
2041
- }
2042
- else {
2043
- currentPath = this . spreaderPathIn . spreaderPathString ;
2044
- }
2050
+ if ( withoutAnimate === undefined ||
2051
+ withoutAnimate === false ) {
2052
+
2053
+ if ( this . wheelnav . currentPercent > this . wheelnav . minPercent ) {
2054
+ currentPath = this . spreaderPathOut . spreaderPathString ;
2055
+ }
2056
+ else {
2057
+ currentPath = this . spreaderPathIn . spreaderPathString ;
2058
+ }
2045
2059
2046
- spreaderTransformAttr = {
2047
- path : currentPath
2048
- } ;
2060
+ spreaderTransformAttr = {
2061
+ path : currentPath
2062
+ } ;
2049
2063
2050
- //Animate spreader
2051
- this . spreaderPath . animate ( spreaderTransformAttr , this . animatetime , this . animateeffect ) ;
2064
+ //Animate spreader
2065
+ this . spreaderPath . animate ( spreaderTransformAttr , this . animatetime , this . animateeffect ) ;
2052
2066
2053
- //titles
2054
- var currentTitle ;
2067
+ //titles
2068
+ var currentTitle ;
2069
+ var titleTransformAttr ;
2055
2070
2056
- if ( this . wheelnav . currentPercent === this . wheelnav . maxPercent ) {
2057
- currentTitle = this . outTitle ;
2058
- this . spreaderTitle . attr ( this . wheelnav . spreaderTitleOutAttr ) ;
2059
- this . spreaderPath . attr ( this . wheelnav . spreaderPathOutAttr ) ;
2060
- }
2061
- else {
2062
- currentTitle = this . inTitle ;
2063
- this . spreaderTitle . attr ( this . wheelnav . spreaderTitleInAttr ) ;
2064
- this . spreaderPath . attr ( this . wheelnav . spreaderPathInAttr ) ;
2065
- }
2071
+ if ( this . wheelnav . currentPercent === this . wheelnav . maxPercent ) {
2072
+ currentTitle = this . outTitle ;
2073
+ titleTransformAttr = this . wheelnav . spreaderTitleOutAttr ;
2074
+ this . spreaderPath . attr ( this . wheelnav . spreaderPathOutAttr ) ;
2075
+ }
2076
+ else {
2077
+ currentTitle = this . inTitle ;
2078
+ titleTransformAttr = this . wheelnav . spreaderTitleInAttr ;
2079
+ this . spreaderPath . attr ( this . wheelnav . spreaderPathInAttr ) ;
2080
+ }
2066
2081
2067
- if ( this . spreaderTitle . type === "path" ) {
2068
- titleTransformAttr = {
2069
- path : currentTitle . path
2070
- } ;
2071
- }
2072
- else {
2073
- //Little hack for proper appearance of "-" sign
2074
- offYOffset = 0 ;
2075
- if ( currentTitle . title === "-" ) { offYOffset = 3 ; }
2082
+ if ( this . spreaderTitle . type === "path" ) {
2083
+ titleTransformAttr . path = currentTitle . path ;
2084
+ }
2085
+ else {
2086
+ //Little hack for proper appearance of "-" sign
2087
+ offYOffset = 0 ;
2088
+ if ( currentTitle . title === "-" ) { offYOffset = 3 ; } ;
2076
2089
2077
- titleTransformAttr = {
2078
- x : currentTitle . x ,
2079
- y : currentTitle . y - offYOffset
2080
- } ;
2090
+ titleTransformAttr . x = currentTitle . x ;
2091
+ titleTransformAttr . y = currentTitle . y - offYOffset ;
2081
2092
2082
- if ( currentTitle . title !== null ) {
2083
- this . spreaderTitle . attr ( { text : currentTitle . title } ) ;
2093
+ if ( currentTitle . title !== null ) {
2094
+ this . spreaderTitle . attr ( { text : currentTitle . title } ) ;
2095
+ }
2084
2096
}
2097
+
2098
+ //Animate title
2099
+ this . spreaderTitle . animate ( titleTransformAttr , this . animatetime , this . animateeffect ) ;
2085
2100
}
2086
2101
2087
- this . spreaderTitle . animate ( titleTransformAttr , this . animatetime , this . animateeffect ) ;
2102
+ this . spreaderPath . toFront ( ) ;
2088
2103
this . spreaderTitle . toFront ( ) ;
2089
2104
}
2090
2105
} ;
@@ -2702,6 +2717,7 @@ var colorpalette = {
2702
2717
defaultpalette : new Array ( "#2ECC40" , "#FFDC00" , "#FF851B" , "#FF4136" , "#0074D9" , "#777" ) ,
2703
2718
purple : new Array ( "#4F346B" , "#623491" , "#9657D6" , "#AD74E7" , "#CBA3F3" ) ,
2704
2719
greenred : new Array ( "#17B92A" , "#FF3D00" , "#17B92A" , "#FF3D00" ) ,
2720
+ greensilver : new Array ( "#1F700A" , "#79CC3C" , "#D4E178" , "#E6D5C3" , "#AC875D" ) ,
2705
2721
oceanfive : new Array ( "#00A0B0" , "#6A4A3C" , "#CC333F" , "#EB6841" , "#EDC951" ) ,
2706
2722
garden : new Array ( "#648A4F" , "#2B2B29" , "#DF6126" , "#FFA337" , "#F57C85" ) ,
2707
2723
gamebookers : new Array ( "#FF9900" , "#DCDCDC" , "#BCBCBC" , "#3299BB" , "#727272" ) ,
@@ -2711,5 +2727,8 @@ var colorpalette = {
2711
2727
theworldismine : new Array ( "#F21D1D" , "#FF2167" , "#B521FF" , "#7E2AA8" , "#000000" ) ,
2712
2728
fractalloveone : new Array ( "#002EFF" , "#00FFF7" , "#00FF62" , "#FFAA00" , "#FFF700" ) ,
2713
2729
fractallovetwo : new Array ( "#FF9500" , "#FF0000" , "#FF00F3" , "#AA00FF" , "#002EFF" ) ,
2714
- fractallove : new Array ( "#002EFF" , "#00FFF7" , "#00FF62" , "#FFAA00" , "#FFF700" , "#FF0000" , "#FF00F3" , "#AA00FF" )
2730
+ fractallove : new Array ( "#002EFF" , "#00FFF7" , "#00FF62" , "#FFAA00" , "#F5D908" , "#FF0000" , "#FF00F3" , "#AA00FF" ) ,
2731
+ sprinkles : new Array ( "#272523" , "#FFACAC" , "#FFD700" , "#00590C" , "#08006D" ) ,
2732
+ goldenyellow : new Array ( "#D8B597" , "#8C4006" , "#B6690F" , "#E3C57F" , "#FFEDBE" ) ,
2733
+ hotaru : new Array ( "#364C4A" , "#497C7F" , "#92C5C0" , "#858168" , "#CCBCA5" )
2715
2734
} ;
0 commit comments