Skip to contents

Helper function to enforce fixed area rules (this one is always true, meaning that this rule should always be enforced). This rule is the default one for any fixed area bundle which has no rule attached to it. All arguments are automatically passed to any rule function by eye_scroll_correct

Usage

rule_true(data_line, fixed_areas_bundle, flag, scroll)

Arguments

data_line

The current line in the .csv file. Includes all the original columns, along with a new "Timestamp.Shifted" column (Timestamp - time_shit), along with "Corrected.X" and "Corrected.Y" columns, which are "Fixation.X" and "Fixation.Y" respectively shifted by top_left_x and top_left_y of the calibration stage

fixed_areas_bundle

The bundle of fixed areas linked to this rule

flag

A boolean that says if this rule is TRUE or FALSE at the moment

scroll

The total amount of pixels that have been scrolled down from the top of the website at the moment

Value

A boolean saying if this rule should now be enforced or not

Examples

rule_true <- function (data_line, fixed_areas_bundle, flag, scroll)
{
  return (TRUE)
}
rules <- list(rule_before_scrolling, rule_after_scrolling, rule_true)