* @function Theme.prototype.scale * @description 获取某像素坐标点 pixelP 相对于中心 center 进行缩放 scaleRatio 倍后的像素点坐标。 * @param {Object} pixelP - 像素点。 * @param {Object} center - 中心点。 * @param {number} scaleRatio - 缩放倍数。 * @returns {Array. } 返回数组型比例。
(pixelP, center, scaleRatio)
| 520 | * @returns {Array.<number>} 返回数组型比例。 |
| 521 | */ |
| 522 | scale(pixelP, center, scaleRatio) { |
| 523 | var x = (pixelP[0] - center[0]) * scaleRatio + center[0]; |
| 524 | var y = (pixelP[1] - center[1]) * scaleRatio + center[1]; |
| 525 | return [x, y]; |
| 526 | } |
| 527 | |
| 528 | /** |
| 529 | * @function Theme.prototype.toiClientFeature |
no outgoing calls
no test coverage detected