Sha256: 432b55886c5a84cc481d5702c286bb46ce0c65b86054c33ae2dcc29ccf12226a

Contents?: true

Size: 1.62 KB

Versions: 3

Compression:

Stored size: 1.62 KB

Contents

/*global define*/
define([
        '../Core/defaultValue',
        '../Scene/LabelStyle'
    ], function(
        defaultValue,
        LabelStyle) {
    "use strict";

    /**
     * Provides methods for working with a label style defined in CZML.
     *
     * @exports CzmlLabelStyle
     *
     * @see LabelStyle
     * @see DynamicProperty
     * @see CzmlBoolean
     * @see CzmlCartesian2
     * @see CzmlCartesian3
     * @see CzmlPosition
     * @see CzmlColor
     * @see CzmlLabelStyle
     * @see CzmlNumber
     * @see CzmlString
     * @see CzmlUnitCartesian3
     * @see CzmlUnitQuaternion
     * @see CzmlUnitSpherical
     * @see CzmlVerticalOrigin
     */
    var CzmlLabelStyle = {
        /**
         * Returns the packed enum representation contained within the provided CZML interval
         * or undefined if the interval does not contain enum data.
         *
         * @param {Object} czmlInterval The CZML interval to unwrap.
         */
        unwrapInterval : function(czmlInterval) {
            return defaultValue(czmlInterval.labelStyle, czmlInterval);
        },

        /**
         * Since enums can not be sampled, this method always returns false.
         */
        isSampled : function() {
            return false;
        },

        /**
         * Returns the LabelStyle contained within the unwrappedInterval.
         *
         * @param {Object} unwrappedInterval The result of CzmlLabelStyle.unwrapInterval.
         * @returns The LabelStyle value.
         */
        getValue : function(unwrappedInterval) {
            return LabelStyle[unwrappedInterval];
        }
    };

    return CzmlLabelStyle;
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cesium-0.18.0 app/assets/javascripts/DynamicScene/CzmlLabelStyle.js
cesium-0.17.0 app/assets/javascripts/DynamicScene/CzmlLabelStyle.js
cesium-0.16.0 app/assets/javascripts/DynamicScene/CzmlLabelStyle.js