Allow comparison of null stroke styles
This commit is contained in:
@@ -30,12 +30,13 @@ ol.style.Stroke;
|
||||
|
||||
|
||||
/**
|
||||
* @param {ol.style.Stroke} strokeStyle1 Stroke style 1.
|
||||
* @param {ol.style.Stroke} strokeStyle2 Stroke style 2.
|
||||
* @param {?ol.style.Stroke} strokeStyle1 Stroke style 1.
|
||||
* @param {?ol.style.Stroke} strokeStyle2 Stroke style 2.
|
||||
* @return {boolean} Equals.
|
||||
*/
|
||||
ol.style.stroke.equals = function(strokeStyle1, strokeStyle2) {
|
||||
return strokeStyle1 === strokeStyle2 || (
|
||||
!goog.isNull(strokeStyle1) && !goog.isNull(strokeStyle2) &&
|
||||
strokeStyle1.color == strokeStyle2.color &&
|
||||
strokeStyle1.width == strokeStyle2.width);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user