OpenLayers OpenLayers

Changeset 5305

Show
Ignore:
Timestamp:
11/30/07 12:48:48 (1 year ago)
Author:
ahocevar
Message:

removed createLiteral calls, because those would not make sense (we already compare against properties)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/ahocevar/styles/lib/OpenLayers/Rule/Comparison.js

    r5299 r5305  
    66/** 
    77 * @requires: OpenLayers/Rule.js 
    8  * @requires: OpenLayers/Style.js 
    98 * 
    109 * Class: OpenLayers.Rule.Comparison 
     
    2120     * APIProperty: type 
    2221     * {String} type: type of the comparison. This is one of 
    23      * - OpenLayers.Rule.Comparison.EQUAL_TO                 = "="; 
     22     * - OpenLayers.Rule.Comparison.EQUAL_TO                 = "=="; 
    2423     * - OpenLayers.Rule.Comparison.NOT_EQUAL_TO             = "!="; 
    2524     * - OpenLayers.Rule.Comparison.LESS_THAN                = "<"; 
     
    103102            case OpenLayers.Rule.Comparison.LESS_THAN_OR_EQUAL_TO: 
    104103            case OpenLayers.Rule.Comparison.GREATER_THAN_OR_EQUAL_TO: 
    105                 return this.binaryCompare(feature, this.property, 
    106                         OpenLayers.Style.createLiteral(this.value, feature)); 
     104                return this.binaryCompare(feature, this.property, this.value); 
    107105             
    108106            case OpenLayers.Rule.Comparison.BETWEEN: 
    109107                var result = 
    110                         attributes[this.property] > 
    111                                 OpenLayers.Style.createLiteral( 
    112                                         this.lowerBoundary, feature); 
     108                        attributes[this.property] > this.lowerBoundary; 
    113109                result = result && 
    114                         attributes[this.property] < 
    115                                 OpenLayers.Style.createLiteral( 
    116                                         this.upperBoundary, feature); 
     110                        attributes[this.property] < this.upperBoundary; 
    117111                return result; 
    118112            case OpenLayers.Rule.Comparison.LIKE: 
    119                 var regexp = new RegExp( 
    120                         OpenLayers.Style.createLiteral(this.value, feature), 
     113                var regexp = new RegExp(this.value, 
    121114                                "gi"); 
    122115                return regexp.test(attributes[this.property]);