Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

expect-maptalks

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expect-maptalks - npm Package Compare versions

Comparing version 0.3.0 to 0.4.0

19

index.js

@@ -135,9 +135,18 @@ 'use strict';

}
var size = layer.getMap().getSize(),
image = layer._getRenderer().getCanvasImage();
if (!image) {
var size, point, canvas;
if (layer.getMap) {
size = layer.getMap().getSize();
var image = layer._getRenderer().getCanvasImage();
point = image.point;
canvas = image.image;
} else {
var map = layer;
size = map.getSize();
point = { x: 0, y: 0 };
canvas = map._getRenderer().canvas;
}
if (!canvas) {
return false;
}
var canvas = image.image;
return isDrawn(parseInt(size.width) / 2 - image.point.x + dx, parseInt(size.height) / 2 - image.point.y + dy, canvas, color);
return isDrawn(parseInt(size.width) / 2 - point.x + dx, parseInt(size.height) / 2 - point.y + dy, canvas, color);
}

@@ -144,0 +153,0 @@

{
"name": "expect-maptalks",
"version": "0.3.0",
"version": "0.4.0",
"description": "A plugin of expect.js(https://github.com/Automattic/expect.js) for maptalks with assertions for Coordinate/GeoJSON/Layer",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -57,3 +57,3 @@ # expect-maptalks

**painted**: asserts the given layer is painted in the center with a offset.
**painted**: asserts the given layer or map is painted in the center with a offset.

@@ -70,2 +70,4 @@ ```js

expect(v).to.be.painted(5, 3, [255, 255, 255]);
//also support map
expect(map).to.be.painted(5, 3, [255, 255, 255]);
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc