Implement hashCode for ol.style.Circle
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
goog.provide('ol.style.Fill');
|
||||
|
||||
goog.require('goog.string');
|
||||
goog.require('ol.color');
|
||||
goog.require('ol.structs.IHashable');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
@@ -8,6 +12,7 @@ goog.provide('ol.style.Fill');
|
||||
*
|
||||
* @constructor
|
||||
* @param {olx.style.FillOptions=} opt_options Options.
|
||||
* @implements {ol.structs.IHashable}
|
||||
* @api
|
||||
*/
|
||||
ol.style.Fill = function(opt_options) {
|
||||
@@ -40,3 +45,16 @@ ol.style.Fill.prototype.getColor = function() {
|
||||
ol.style.Fill.prototype.setColor = function(color) {
|
||||
this.color_ = color;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.style.Fill.prototype.hashCode = function() {
|
||||
var hash = 17;
|
||||
|
||||
hash = hash * 23 + (!goog.isNull(this.color_) ?
|
||||
goog.string.hashCode(ol.color.asString(this.color_)) : 0);
|
||||
|
||||
return hash;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user