Fix #4114 - "black" being ignored as a color in some contexts.
[potlatch2.git] / net / systemeD / halcyon / styleparser / TagValue.as
1 package net.systemeD.halcyon.styleparser {
2
3         /*
4                 === TagValue ===
5
6                 This is a custom declaration value that means 'use the value of this tag'.
7                 In other words,
8                         { set ref=tag('dftnumber'); }
9                 parses to
10                         TagValue('dftnumber')
11                 and returns the value of the dftnumber tag.
12                 
13                 There isn't really any logic contained within this class, it's just here 
14                 so that we can store it as a custom property within Styles (like Eval).
15
16         */
17
18         public class TagValue {
19                 private var key:String;
20
21                 public function TagValue(k:String) {
22                         key=k;
23                 }
24
25                 public function getValue(tags:Object):String {
26                         return tags[key];
27                 }
28                 
29                 public function toString():String {
30                         return "TagValue("+key+")";
31                 }
32         }
33 }