From ba638f06a1f679779c2fcfaf634cb8cdb5e63ee6 Mon Sep 17 00:00:00 2001 From: Mariela Michalek Date: Sun, 3 Aug 2014 19:55:34 -0300 Subject: [PATCH] remove bind from ImageIcon --- mindplot/src/main/javascript/ImageIcon.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mindplot/src/main/javascript/ImageIcon.js b/mindplot/src/main/javascript/ImageIcon.js index f217520d..a31accb9 100644 --- a/mindplot/src/main/javascript/ImageIcon.js +++ b/mindplot/src/main/javascript/ImageIcon.js @@ -34,16 +34,17 @@ mindplot.ImageIcon = new Class({ //Icon var image = this.getImage(); + var me = this; image.addEvent('click', function () { var iconType = iconModel.getIconType(); - var newIconType = this._getNextFamilyIconId(iconType); + var newIconType = me._getNextFamilyIconId(iconType); iconModel.setIconType(newIconType); - var imgUrl = this._getImageUrl(newIconType); - this._image.setHref(imgUrl); + var imgUrl = me._getImageUrl(newIconType); + me._image.setHref(imgUrl); - }.bind(this)); + }); this._image.setCursor('pointer'); } },