Use string instead of ol.structs.Checksum

This commit is contained in:
tsauerwein
2014-12-04 11:48:43 +01:00
parent 6d1d47a918
commit 0fd1a575a9
5 changed files with 15 additions and 21 deletions

View File

@@ -1,12 +1,6 @@
goog.provide('ol.structs.IHasChecksum');
/**
* @typedef {string}
*/
ol.structs.Checksum;
/**
* @interface

View File

@@ -29,7 +29,7 @@ ol.style.Circle = function(opt_options) {
/**
* @private
* @type {Array.<ol.structs.Checksum>|null}
* @type {Array.<string>}
*/
this.checksums_ = null;

View File

@@ -26,9 +26,9 @@ ol.style.Fill = function(opt_options) {
/**
* @private
* @type {?ol.structs.Checksum}
* @type {string|undefined}
*/
this.checksum_ = null;
this.checksum_ = undefined;
};
@@ -49,7 +49,7 @@ ol.style.Fill.prototype.getColor = function() {
*/
ol.style.Fill.prototype.setColor = function(color) {
this.color_ = color;
this.checksum_ = null;
this.checksum_ = undefined;
};
@@ -57,7 +57,7 @@ ol.style.Fill.prototype.setColor = function(color) {
* @inheritDoc
*/
ol.style.Fill.prototype.getChecksum = function() {
if (goog.isNull(this.checksum_)) {
if (!goog.isDef(this.checksum_)) {
this.checksum_ = 'f' + (!goog.isNull(this.color_) ?
ol.color.asString(this.color_) : '-');
}

View File

@@ -28,7 +28,7 @@ ol.style.RegularShape = function(opt_options) {
/**
* @private
* @type {Array.<ol.structs.Checksum>|null}
* @type {Array.<string>}
*/
this.checksums_ = null;

View File

@@ -61,9 +61,9 @@ ol.style.Stroke = function(opt_options) {
/**
* @private
* @type {?ol.structs.Checksum}
* @type {string|undefined}
*/
this.checksum_ = null;
this.checksum_ = undefined;
};
@@ -129,7 +129,7 @@ ol.style.Stroke.prototype.getWidth = function() {
*/
ol.style.Stroke.prototype.setColor = function(color) {
this.color_ = color;
this.checksum_ = null;
this.checksum_ = undefined;
};
@@ -141,7 +141,7 @@ ol.style.Stroke.prototype.setColor = function(color) {
*/
ol.style.Stroke.prototype.setLineCap = function(lineCap) {
this.lineCap_ = lineCap;
this.checksum_ = null;
this.checksum_ = undefined;
};
@@ -153,7 +153,7 @@ ol.style.Stroke.prototype.setLineCap = function(lineCap) {
*/
ol.style.Stroke.prototype.setLineDash = function(lineDash) {
this.lineDash_ = lineDash;
this.checksum_ = null;
this.checksum_ = undefined;
};
@@ -165,7 +165,7 @@ ol.style.Stroke.prototype.setLineDash = function(lineDash) {
*/
ol.style.Stroke.prototype.setLineJoin = function(lineJoin) {
this.lineJoin_ = lineJoin;
this.checksum_ = null;
this.checksum_ = undefined;
};
@@ -177,7 +177,7 @@ ol.style.Stroke.prototype.setLineJoin = function(lineJoin) {
*/
ol.style.Stroke.prototype.setMiterLimit = function(miterLimit) {
this.miterLimit_ = miterLimit;
this.checksum_ = null;
this.checksum_ = undefined;
};
@@ -189,7 +189,7 @@ ol.style.Stroke.prototype.setMiterLimit = function(miterLimit) {
*/
ol.style.Stroke.prototype.setWidth = function(width) {
this.width_ = width;
this.checksum_ = null;
this.checksum_ = undefined;
};
@@ -197,7 +197,7 @@ ol.style.Stroke.prototype.setWidth = function(width) {
* @inheritDoc
*/
ol.style.Stroke.prototype.getChecksum = function() {
if (goog.isNull(this.checksum_)) {
if (!goog.isDef(this.checksum_)) {
var raw = 's' +
(!goog.isNull(this.color_) ?
ol.color.asString(this.color_) : '-') + ',' +