123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- 'use strict';
- define(['../../lib/@waca/core-client/js/core-client/ui/core/Events'], function (Events) {
- var SelectionModel = null;
-
- SelectionModel = Events.extend({
- _bSelectionModeOn: false,
- init: function init() {
- SelectionModel.inherited('init', this, arguments);
- },
- inSelectionMode: function inSelectionMode() {
- return this._bSelectionModeOn;
- },
-
- turnOnSelectionMode: function turnOnSelectionMode(event) {
- this._bSelectionModeOn = true;
- this.trigger('selectionMode:ON', { 'payload': event });
- },
-
- turnOffSelectionMode: function turnOffSelectionMode(event) {
- this._bSelectionModeOn = false;
- this.trigger('selectionMode:OFF', { 'payload': event });
- },
-
- stopSelectionMode: function stopSelectionMode() {
- this._bSelectionModeOn = false;
- this.unselectAll();
- },
-
- startSelectionMode: function startSelectionMode() {
- this._bSelectionModeOn = true;
- this.unselectAll();
- },
-
- getSelections: function getSelections() {
- return [];
- },
- unselectAll: function unselectAll() {
- return;
- }
- });
- return SelectionModel;
- });
|