MCPcopy Create free account
hub / github.com/SuperMap/iClient-JavaScript / findGraphicByPixel

Method findGraphicByPixel

src/openlayers/overlay/Graphic.js:256–265  ·  view source on GitHub ↗
(e, me)

Source from the content-addressed store, hash-verified

254 }
255
256 findGraphicByPixel(e, me) {
257 const features = me.map.getFeaturesAtPixel(e.pixel) || [];
258 for (let index = 0; index < features.length; index++) {
259 const graphic = features[index];
260 if (me.graphics.indexOf(graphic) > -1) {
261 return graphic;
262 }
263 }
264 return undefined;
265 }
266
267 /**
268 * @function Graphic.prototype.setGraphics

Callers 2

GraphicSpec.jsFile · 0.80
constructorMethod · 0.80

Calls 1

indexOfMethod · 0.80

Tested by

no test coverage detected