From 45771a4a430523d57391f7d9a2df625c57b15711 Mon Sep 17 00:00:00 2001 From: "Michael \"Z\" Goddard" Date: Tue, 11 Jun 2019 11:13:39 -0400 Subject: [PATCH] add updateDrawable* methods to FakeRenderer --- test/fixtures/fake-renderer.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/test/fixtures/fake-renderer.js b/test/fixtures/fake-renderer.js index 37cce0a5340..73b37ede6e8 100644 --- a/test/fixtures/fake-renderer.js +++ b/test/fixtures/fake-renderer.js @@ -14,12 +14,28 @@ FakeRenderer.prototype.getFencedPositionOfDrawable = function (d, p) { // eslint return [p[0], p[1]]; }; +FakeRenderer.prototype.updateDrawableSkinId = function (d, skinId) { // eslint-disable-line no-unused-vars +}; + +FakeRenderer.prototype.updateDrawableSkinIdRotationCenter = + function (d, skinId, rotationCenter) {}; // eslint-disable-line no-unused-vars + +FakeRenderer.prototype.updateDrawablePosition = function (d, position) { // eslint-disable-line no-unused-vars + this.x = position[0]; + this.y = position[1]; +}; + +FakeRenderer.prototype.updateDrawableDirectionScale = + function (d, direction, scale) {}; // eslint-disable-line no-unused-vars + +FakeRenderer.prototype.updateDrawableVisible = function (d, visible) { // eslint-disable-line no-unused-vars +}; + +FakeRenderer.prototype.updateDrawableEffect = function (d, effectName, value) { // eslint-disable-line no-unused-vars +}; + FakeRenderer.prototype.updateDrawableProperties = function (d, p) { // eslint-disable-line no-unused-vars - if (p.position) { - this.x = p.position[0]; - this.y = p.position[1]; - } - return true; + throw new Error('updateDrawableProperties is deprecated'); }; FakeRenderer.prototype.getCurrentSkinSize = function (d) { // eslint-disable-line no-unused-vars