Event handler for [DataTable.onRowsChanged].
(&self, record: DataCollectionChangeRecord)
| 174 | |
| 175 | /// Event handler for [DataTable.onRowsChanged]. |
| 176 | pub fn data_rows_changed(&self, record: DataCollectionChangeRecord) { |
| 177 | // self.calculate_drawing_sizes(ctx); |
| 178 | let entity_count = self.data.frames.len(); |
| 179 | let removed_end = record.index + record.removed_count; |
| 180 | let added_end = record.index + record.added_count; |
| 181 | let channels = self.channels.borrow(); |
| 182 | for channel in channels.iter() { |
| 183 | // Remove old entities. |
| 184 | if record.removed_count > 0 { |
| 185 | // channel.freeEntities(record.index, removedEnd); |
| 186 | // channel.entities.remove_range(record.index, removedEnd); |
| 187 | } |
| 188 | |
| 189 | // Insert new entities. |
| 190 | if record.added_count > 0 { |
| 191 | // let newEntities = create_entities( |
| 192 | // i, record.index, addedEnd, channel.color, channel.highlight_color); |
| 193 | // channel.entities.insertAll(record.index, newEntities); |
| 194 | |
| 195 | // // Update entity indexes. |
| 196 | // for (let j = addedEnd; j < entity_count; j++) { |
| 197 | // channel.entities[j].index = j; |
| 198 | // } |
| 199 | } |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | /// Event handler for [DataTable.onColumnsChanged]. |
| 204 | pub fn data_columns_changed(&self, record: DataCollectionChangeRecord) { |
nothing calls this directly
no outgoing calls
no test coverage detected