This repository was archived by the owner on Sep 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 6
6
* or one that should be observed and dynamically interpolated.
7
7
*/
8
8
var STATIC_COLOR_EXPRESSION = / ^ { ( ( \s | , ) * ?[ " ' a - z A - Z - ] + ?\s * ?: \s * ?( ' | " ) [ a - z A - Z 0 - 9 - .] * ( ' | " ) ) + \s * } $ / ;
9
- var COLOR_PALETTES = undefined ;
9
+ var colorPalettes = undefined ;
10
10
11
11
/**
12
12
* @ngdoc module
41
41
*
42
42
*/
43
43
function MdColorsService ( $mdTheming , $mdColorPalette , $mdUtil , $parse ) {
44
- COLOR_PALETTES = COLOR_PALETTES || Object . keys ( $mdColorPalette ) ;
44
+ colorPalettes = colorPalettes || Object . keys ( $mdColorPalette ) ;
45
45
46
46
// Publish service instance
47
47
return {
144
144
// If the next section is one of the palettes we assume it's a two word palette
145
145
// Two word palette can be also written in camelCase, forming camelCase to dash-case
146
146
147
- var isTwoWord = parts . length > 1 && COLOR_PALETTES . indexOf ( parts [ 1 ] ) !== - 1 ;
147
+ var isTwoWord = parts . length > 1 && colorPalettes . indexOf ( parts [ 1 ] ) !== - 1 ;
148
148
var palette = parts [ 0 ] . replace ( / ( [ a - z ] ) ( [ A - Z ] ) / g, '$1-$2' ) . toLowerCase ( ) ;
149
149
150
150
if ( isTwoWord ) palette = parts [ 0 ] + '-' + parts . splice ( 1 , 1 ) ;
151
151
152
- if ( COLOR_PALETTES . indexOf ( palette ) === - 1 ) {
152
+ if ( colorPalettes . indexOf ( palette ) === - 1 ) {
153
153
// If the palette is not in the palette list it's one of primary/accent/warn/background
154
154
var scheme = $mdTheming . THEMES [ theme ] . colors [ palette ] ;
155
155
if ( ! scheme ) {
You can’t perform that action at this time.
0 commit comments