(style, prevStyle)
| 347 | } |
| 348 | |
| 349 | function styleChanged(style, prevStyle) { |
| 350 | if (!prevStyle) { |
| 351 | return false; |
| 352 | } |
| 353 | const cache = []; |
| 354 | const replacer = function(key, value) { |
| 355 | if (!isPatternOrGradient(value)) { |
| 356 | return value; |
| 357 | } |
| 358 | if (!cache.includes(value)) { |
| 359 | cache.push(value); |
| 360 | } |
| 361 | return cache.indexOf(value); |
| 362 | }; |
| 363 | return JSON.stringify(style, replacer) !== JSON.stringify(prevStyle, replacer); |
| 364 | } |