Commit 82ddfbe0 authored by Sergey Antonovich's avatar Sergey Antonovich 🇯🇵

Update numbering-rows.mb

parent 983aba6a
...@@ -12,13 +12,13 @@ ...@@ -12,13 +12,13 @@
```javascript ```javascript
function numericTable(tableID,cmpID){ function numericTable(tableID,cmpID){
var tbl = model.playerModel.getModelWithId(""+tableID); var tbl = model.playerModel.getModelWithId(""+tableID);
tbl.modelBlocks.forEach(function(item, key){ try{
try{ model.playerModel.getModelWithId(""+cmpID).setValue(""+tbl.modelBlocks.length);
}catch(Exception){
tbl.modelBlocks.forEach(function(item,key){
model.playerModel.getModelWithId(""+cmpID,""+tbl.asfProperty.id,item.tableBlockIndex).setValue(""+parseInt(++key)); model.playerModel.getModelWithId(""+cmpID,""+tbl.asfProperty.id,item.tableBlockIndex).setValue(""+parseInt(++key));
}catch(Exception){ });
model.playerModel.getModelWithId(""+cmpID).setValue(""+parseInt(++key)); }
}
});
if(('numericCode' in tbl) === false){ if(('numericCode' in tbl) === false){
tbl.on('tableRowAdd',function(){numericTable(tableID,cmpID);}); tbl.on('tableRowAdd',function(){numericTable(tableID,cmpID);});
tbl.on('tableRowDelete',function(){numericTable(tableID,cmpID);}); tbl.on('tableRowDelete',function(){numericTable(tableID,cmpID);});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment