1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| var aSelection = function (selName) {
this.id = '';
this.Name = selName;
this.type = '';
this.Text ='';
this.Comment ='';
this.selectedRange = {}; // getRange of selection select one only range into multiple selection
this.Range = {}; // new Range ;Will get the range when the selection is fixed (supports only one range
this.Start = {};// in the node but attributes are adapted .todo simplify management
this.End = {}; // in the node but attributes are adapted .todo simplify management
this.autoupd = false;
this.Node = {}; // Defined after treatment of the Range and add if necessary off an element, by default the Valid HTML which envelops the Range
this.Node.element = {}; // The Node is the element which is the closest envelop of the range after analyse
this.Node.start = {}; // The element which is closest the element before the beginning of the range can be a copy of AnchorNode of Range
this.Node.end = {}; // The element which is the closest element after the end of the range can be a copy of BaseNode of Range
this.Header = {};
this.Header.id = '';
this.Header.xname = ''; // enocoded text of header
this.Header.JQelement={}; // JQuery selection objet with length = 1
this.Header.Text='';
this.Header.level ='';
this.Layer = {};
this.Layer.JQelement={}; // JQuery selection object with length = 1 for Layer element
this.url = ""; // Contains the fragment defined
this.init = false; // Init is ended validated
this.locked = false; // The selection is ready for data to be stored and must not be modified (locked) has been frozen
this.generated={};
this.generated.selectionchange = false;
// Function to check and set coherency
};
/**
* These vars can be used only to compare data with values not for inherited objects
* @type {aSelection}
*/
var curSelection = new aSelection('current');
curSelection.Range=new Range; // IE js don't accepts inherit objets !!! in ...### as this.Range = new Range should be ???
var prevSelection = new aSelection('previous');
prevSelection.Range=new Range;
var curBkmRange = new Range; // The range associated to a frozen selection to current Bkm creation |
Partager