removeTarget method

void removeTarget(
  1. Element element,
  2. {bool drag = true,
  3. bool over = true,
  4. bool out = true}
)

Remove a target from the set

Implementation

void removeTarget(Element element, {bool drag: true, bool over: true, bool out: true}) {
  if(drag && _targets.contains(element)) {
    // remove down handler
    _cancel("mouseDown", element);
    _targets.remove(element);
    _logger.finer("removing ${element.hashCode} and cancelling mouse down");
  }
  if(over && _overTargets.contains(element)) {
    // TOD if have subscribers?
    _cancel("mouseOver", element);
    _overTargets.remove(element);
    _logger.finer("removing ${element.hashCode} and cancelling mouse over");
  }
  if(out && _outTargets.contains(element)) {
    _cancel("mouseOut", element);
    _outTargets.remove(element);
    _logger.finer("removing ${element.hashCode} and cancelling mouse out");
  }
}