From: Richard Fairhurst Date: Fri, 12 Nov 2010 10:52:15 +0000 (+0000) Subject: fix dynamically applied NodeUI state classes to invalidate style list when changed X-Git-Tag: 0.5~83 X-Git-Url: https://git.openstreetmap.org/potlatch2.git/commitdiff_plain/e3ead19ea35d6f827d1e1f043d87d9c4f5d20098 fix dynamically applied NodeUI state classes to invalidate style list when changed --- diff --git a/net/systemeD/halcyon/EntityUI.as b/net/systemeD/halcyon/EntityUI.as index 88757e3b..11cb0a76 100644 --- a/net/systemeD/halcyon/EntityUI.as +++ b/net/systemeD/halcyon/EntityUI.as @@ -169,6 +169,7 @@ package net.systemeD.halcyon { } public function setStateClass(stateType:String, isOn:*):Boolean { + if ( isOn == true ) { isOn='yes'; } if ( isOn && stateClasses[stateType] != isOn ) { stateClasses[stateType] = isOn; invalidateStyleList(); diff --git a/net/systemeD/halcyon/NodeUI.as b/net/systemeD/halcyon/NodeUI.as index 4ad5bd92..07477bc6 100644 --- a/net/systemeD/halcyon/NodeUI.as +++ b/net/systemeD/halcyon/NodeUI.as @@ -54,10 +54,10 @@ package net.systemeD.halcyon { if (entity.deleted) { return false; } var tags:Object = entity.getTagsCopy(); + setStateClass('poi', !entity.hasParentWays); + setStateClass('hasTags', entity.hasInterestingTags()); + setStateClass('dupe', Node(entity).isDupe()); tags=applyStateClasses(tags); - if (!entity.hasParentWays) { tags[':poi']='yes'; } - if (entity.hasInterestingTags()) { tags[':hasTags']='yes'; } - if (Node(entity).isDupe()) { tags[':dupe']='yes'; } if (!styleList || !styleList.isValidAt(paint.map.scale)) { styleList=paint.ruleset.getStyles(entity,tags,paint.map.scale); }