Add ol.style.fill.equals
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
goog.provide('ol.style.DefaultStyleFunction');
|
||||
goog.provide('ol.style.Style');
|
||||
goog.provide('ol.style.StyleFunction');
|
||||
goog.provide('ol.style.fill');
|
||||
goog.provide('ol.style.stroke');
|
||||
|
||||
goog.require('goog.functions');
|
||||
@@ -13,6 +14,19 @@ goog.require('goog.functions');
|
||||
ol.style.Fill;
|
||||
|
||||
|
||||
/**
|
||||
* @param {?ol.style.Fill} fillStyle1 Fill style 1.
|
||||
* @param {?ol.style.Fill} fillStyle2 Fill style 2.
|
||||
* @return {boolean} Equals.
|
||||
*/
|
||||
ol.style.fill.equals = function(fillStyle1, fillStyle2) {
|
||||
return fillStyle1 === fillStyle2 || (
|
||||
!goog.isNull(fillStyle1) && !goog.isNull(fillStyle2) &&
|
||||
fillStyle1.color == fillStyle2.color &&
|
||||
fillStyle1.opacity == fillStyle2.opacity);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {{anchor: Array.<number>,
|
||||
* image: (HTMLCanvasElement|HTMLVideoElement|Image),
|
||||
|
||||
Reference in New Issue
Block a user