From 2c73b682d1f8c3263d6ee13c6fcaf775340d532f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Thu, 27 Sep 2012 21:05:38 -0700 Subject: [PATCH] Fix variable naming conflict (ticket #191). Fix other warnings. --- .../src/main/resources/oskeyboard.js | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/guacamole-common-js/src/main/resources/oskeyboard.js b/guacamole-common-js/src/main/resources/oskeyboard.js index 3acebdb63..f5e72d2b2 100644 --- a/guacamole-common-js/src/main/resources/oskeyboard.js +++ b/guacamole-common-js/src/main/resources/oskeyboard.js @@ -63,8 +63,8 @@ Guacamole.OnScreenKeyboard = function(url) { var scaledElements = []; - var modifiers = {}; - var currentModifier = 1; + var modifier_masks = {}; + var next_mask = 1; /** * Adds a class to an element. @@ -135,17 +135,17 @@ Guacamole.OnScreenKeyboard = function(url) { // Returns a unique power-of-two value for the modifier with the // given name. The same value will be returned for the same modifier. - function getModifier(name) { + function getModifierMask(name) { - var value = modifiers[name]; + var value = modifier_masks[name]; if (!value) { // Get current modifier, advance to next - value = currentModifier; - currentModifier <<= 1; + value = next_mask; + next_mask <<= 1; // Store value of this modifier - modifiers[name] = value; + modifier_masks[name] = value; } @@ -318,7 +318,7 @@ Guacamole.OnScreenKeyboard = function(url) { // list of required modifiers. var requirements = e.getAttribute("if").split(","); for (var i=0; i