Zebra API Doc

zebra.util.Position Class

Useful class to track a virtual cursor position in a structure that has dedicated number of lines where every line has a number of elements. The structure metric has to be described by providing an instance of
zebra.util.Position.Metric interface that discovers how many lines the structure has and how many elements every line includes.

Constructor

zebra.util.Position

(
  • m
)

Parameters:

Item Index

Events

Events

posChanged

Fire when a virtual cursor position has been updated

   position.bind(function(src, prevOffset, prevLine, prevCol) {
       ...
   });

Event Parameters:

  • src zebra.util.Position

    an object that triggers the event

  • prevOffest Integer

    a previous virtual cursor offset

  • prevLine Integer

    a previous virtual cursor line

  • prevCol Integer

    a previous virtual cursor column in the previous line