File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,12 @@ function updateProgress(percentage)
102102 }
103103}
104104
105+ function deletePoint ( i ) {
106+ console . log ( 'deleting' , i )
107+ graph . profile . data . splice ( i , 1 ) ;
108+ updateProfileTable ( ) ;
109+ }
110+
105111function updateProfileTable ( )
106112{
107113 var dps = 0 ;
@@ -123,7 +129,7 @@ function updateProfileTable()
123129 html += '<td><input type="text" class="form-control" id="profiletable-0-' + i + '" value="' + timeProfileFormatter ( graph . profile . data [ i ] [ 0 ] , true ) + '" style="width: 60px" /></td>' ;
124130 html += '<td><input type="text" class="form-control" id="profiletable-1-' + i + '" value="' + graph . profile . data [ i ] [ 1 ] + '" style="width: 60px" /></td>' ;
125131 html += '<td><div class="input-group"><span class="glyphicon glyphicon-circle-arrow-' + slope + ' input-group-addon ds-trend" style="background: ' + color + '"></span><input type="text" class="form-control ds-input" readonly value="' + formatDPS ( dps ) + '" style="width: 100px" /></div></td>' ;
126- html += '<td> </td></tr>' ;
132+ html += '<td><button type="button" class="btn btn-danger" onclick="deletePoint(' + i + ')"><span class="glyphicon glyphicon-trash"></span></button> </td></tr>';
127133 }
128134
129135 html += '</table></div>' ;
You can’t perform that action at this time.
0 commit comments