Changing the position of an object @ a certain ComboBox value (HTML5 canvas)
Hi all:),
I'm trying to change the position of objectX to a certain coordinate after the user is using a ComboBox value. To do this I'm using the following code. The ComboBox is basically a dropdown with values from 1-10. Ive tried both if (value == 2) and if (value == "2"), but this just does not seem to work. Anyone knows how to do this?
Thanks very much in advance!
The code:
var _this = this;
$('#dom_overlay_container').on('change', '#Touchpoint1_Dropdown', function() {
var value = $('#Touchpoint1_Dropdown').val();
if (value == 2) {
this.objectX.x = 200;
this.objectX.y = 100;
}
}.bind(_this));
