MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / add

Method add

src/common/commontypes/Pixel.js:117–122  ·  view source on GitHub ↗

* @function Pixel.prototype.add * @description 在原来像素坐标基础上,x 值加上传入的 x 参数,y 值加上传入的 y 参数。 * @example * var pixcel = new Pixel(100,50); * //pixcel2是新的对象 * var pixcel2 = pixcel.add(20,30); * * @param {number} x - 传入的 x 值。 * @param {number} y - 传入的 y 值。 * @returns {Pixel} 新的 pix

(x, y)

Source from the content-addressed store, hash-verified

115 * @returns {Pixel} 新的 pixel 对象,该 pixel 是由当前的 pixel 与传入的 x,y 相加得到。
116 */
117 add(x, y) {
118 if (x == null || y == null) {
119 throw new TypeError('Pixel.add cannot receive null values');
120 }
121 return new Pixel(this.x + x, this.y + y);
122 }
123
124 /**
125 * @function Pixel.prototype.offset

Callers 15

offsetMethod · 0.95
MapExtendSpec.jsFile · 0.45
ThreeLayerSpec.jsFile · 0.45
BoundsSpec.jsFile · 0.45
LonLatSpec.jsFile · 0.45
AnimationSpec.jsFile · 0.45
VectorSpec.jsFile · 0.45
bgFunction · 0.45
jquery.jsFile · 0.45
jasmine.jsFile · 0.45
addDataMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected