MCPcopy Index your code
hub / github.com/g3n/engine / scrollUp

Method scrollUp

gui/table.go:743–759  ·  view source on GitHub ↗

ScrollUp scrolls the table the specified number of rows up if possible

(n int)

Source from the content-addressed store, hash-verified

741
742// ScrollUp scrolls the table the specified number of rows up if possible
743func (t *Table) scrollUp(n int) {
744
745 // Calculates number of rows to scroll up
746 if t.firstRow == 0 {
747 return
748 }
749 if n > t.firstRow {
750 n = t.firstRow
751 }
752 t.firstRow -= n
753 lastRow := t.lastRow - n
754 if t.rowCursor > lastRow {
755 t.rowCursor = lastRow
756 t.Dispatch(OnChange, nil)
757 }
758 t.recalc()
759}
760
761// removeRow removes from the table the row specified its index
762func (t *Table) removeRow(row int) {

Callers 3

onScrollMethod · 0.95
selPrevMethod · 0.95
prevPageMethod · 0.95

Calls 2

recalcMethod · 0.95
DispatchMethod · 0.65

Tested by

no test coverage detected