freealise commited on
Commit
04a4806
1 Parent(s): 1d0244a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -373,7 +373,7 @@ with gr.Blocks(css=css) as demo:
373
  this.onpointerup = function(event) {
374
  var pl_a = document.getElementById(\"pl\").getAttribute(\"points\").replace(/\d+,/g, \"\").split(\" \");
375
  for (var i=0; i<pl_a.length; i++) {
376
- pl_a[i] = pl_a[i] * 2 + 1;
377
  }
378
  document.getElementsByTagName(\"textarea\")[1].value = pl_a.join(\" \");
379
  this.style.borderBottom = \"1px dotted black\";
 
373
  this.onpointerup = function(event) {
374
  var pl_a = document.getElementById(\"pl\").getAttribute(\"points\").replace(/\d+,/g, \"\").split(\" \");
375
  for (var i=0; i<pl_a.length; i++) {
376
+ pl_a[i] = parseInt(pl_a[i]) * 2 + 1;
377
  }
378
  document.getElementsByTagName(\"textarea\")[1].value = pl_a.join(\" \");
379
  this.style.borderBottom = \"1px dotted black\";