Lines Matching refs:node

2138 	      paddingRight: function(i, node) { return (i < node.table.widths.length - 1) ? 4 : 0; },
2141 hLineWidth: function(i, node) {
2142 if (i === 0 || i === node.table.body.length) return 0;
2143 return (i === node.table.headerRows) ? 2 : 0;
2149 paddingRight: function(i, node) {
2150 return (i === node.table.widths.length - 1) ? 0 : 8;
2154 hLineWidth: function(i, node) {
2155 if (i === 0 || i === node.table.body.length) return 0;
2156 return (i === node.table.headerRows) ? 2 : 1;
2163 paddingRight: function(i, node) {
2164 return (i === node.table.widths.length - 1) ? 0 : 8;
2171 …hLineWidth: function(i, node) { return 1; }, //return node.table.headerRows && i === node.table.he…
2172 vLineWidth: function(i, node) { return 1; },
2173 hLineColor: function(i, node) { return 'black'; },
2174 vLineColor: function(i, node) { return 'black'; },
2175 paddingLeft: function(i, node) { return 4; }, //i && 4 || 0; },
2176 paddingRight: function(i, node) { return 4; }, //(i < node.table.widths.length - 1) ? 4 : 0; },
2177 paddingTop: function(i, node) { return 2; },
2178 paddingBottom: function(i, node) { return 2; }
13458 linearNodeList = _.reject(linearNodeList, function(node){
13459 return _.isEmpty(node.positions);
13462 _.each(linearNodeList, function(node) {
13463 var nodeInfo = _.pick(node, [
13468 nodeInfo.startPosition = _.first(node.positions);
13469 nodeInfo.pageNumbers = _.chain(node.positions).map('pageNumber').uniq().value();
13471 nodeInfo.stack = _.isArray(node.stack);
13473 node.nodeInfo = nodeInfo;
13476 return _.any(linearNodeList, function (node, index, followingNodeList) {
13477 if (node.pageBreak !== 'before' && !node.pageBreakCalculated) {
13478 node.pageBreakCalculated = true;
13479 var pageNumber = _.first(node.nodeInfo.pageNumbers);
13493 if (pageBreakBeforeFct(node.nodeInfo,
13497 node.pageBreak = 'before';
13508 _.each(result.linearNodeList, function (node) {
13509 node.resetXY();
13569 var node = nodeGetter(pageIndex + 1, l);
13571 if (node) {
13574 this.processNode(this.docMeasure.measureDocument(node));
13663 function decorateNode(node){
13664 var x = node.x, y = node.y;
13665 node.positions = [];
13667 _.each(node.canvas, function(vector){
13679 node.resetXY = function(){
13680 node.x = x;
13681 node.y = y;
13682 _.each(node.canvas, function(vector){
13688 LayoutBuilder.prototype.processNode = function(node) {
13691 this.linearNodeList.push(node);
13692 decorateNode(node);
13695 var absPosition = node.absolutePosition;
13701 if (node.stack) {
13702 self.processVerticalContainer(node);
13703 } else if (node.columns) {
13704 self.processColumns(node);
13705 } else if (node.ul) {
13706 self.processList(false, node);
13707 } else if (node.ol) {
13708 self.processList(true, node);
13709 } else if (node.table) {
13710 self.processTable(node);
13711 } else if (node.text !== undefined) {
13712 self.processLeaf(node);
13713 } else if (node.image) {
13714 self.processImage(node);
13715 } else if (node.canvas) {
13716 self.processCanvas(node);
13717 } else if (node.qr) {
13718 self.processQr(node);
13719 }else if (!node._span) {
13720 throw 'Unrecognized document structure: ' + JSON.stringify(node, fontStringify);
13729 var margin = node._margin;
13731 if (node.pageBreak === 'before') {
13732 self.writer.moveToNextPage(node.pageOrientation);
13747 if (node.pageBreak === 'after') {
13748 self.writer.moveToNextPage(node.pageOrientation);
13754 LayoutBuilder.prototype.processVerticalContainer = function(node) {
13756 node.stack.forEach(function(item) {
13758 addAll(node.positions, item.positions);
13862 LayoutBuilder.prototype.processList = function(orderedList, node) {
13864 items = orderedList ? node.ol : node.ul,
13865 gapSize = node._gapSize;
13874 addAll(node.positions, item.positions);
13922 LayoutBuilder.prototype.processLeaf = function(node) {
13923 var line = this.buildNextLine(node);
13925 var maxHeight = node.maxHeight || -1;
13929 node.positions.push(positions);
13930 line = this.buildNextLine(node);
13952 LayoutBuilder.prototype.processImage = function(node) {
13953 var position = this.writer.addImage(node);
13954 node.positions.push(position);
13957 LayoutBuilder.prototype.processCanvas = function(node) {
13958 var height = node._minHeight;
13967 node.canvas.forEach(function(vector) {
13969 node.positions.push(position);
13975 LayoutBuilder.prototype.processQr = function(node) {
13976 var position = this.writer.addQr(node);
13977 node.positions.push(position);
14075 DocMeasure.prototype.measureNode = function(node) {
14077 if (node instanceof Array) {
14078 node = { stack: node };
14079 } else if (typeof node == 'string' || node instanceof String) {
14080 node = { text: node };
14085 return this.styleStack.auto(node, function() {
14087 node._margin = getNodeMargin(node);
14089 if (node.columns) {
14090 return extendMargins(self.measureColumns(node));
14091 } else if (node.stack) {
14092 return extendMargins(self.measureVerticalContainer(node));
14093 } else if (node.ul) {
14094 return extendMargins(self.measureList(false, node));
14095 } else if (node.ol) {
14096 return extendMargins(self.measureList(true, node));
14097 } else if (node.table) {
14098 return extendMargins(self.measureTable(node));
14099 } else if (node.text !== undefined) {
14100 return extendMargins(self.measureLeaf(node));
14101 } else if (node.image) {
14102 return extendMargins(self.measureImage(node));
14103 } else if (node.canvas) {
14104 return extendMargins(self.measureCanvas(node));
14105 } else if (node.qr) {
14106 return extendMargins(self.measureQr(node));
14108 throw 'Unrecognized document structure: ' + JSON.stringify(node, fontStringify);
14112 function extendMargins(node) {
14113 var margin = node._margin;
14116 node._minWidth += margin[0] + margin[2];
14117 node._maxWidth += margin[0] + margin[2];
14120 return node;
14125 function processSingleMargins(node, currentMargin){
14126 if (node.marginLeft || node.marginTop || node.marginRight || node.marginBottom) {
14128 node.marginLeft || currentMargin[0] || 0,
14129 node.marginTop || currentMargin[1] || 0,
14130 node.marginRight || currentMargin[2] || 0,
14131 node.marginBottom || currentMargin[3] || 0
14164 if(node.style) {
14165 var styleArray = (node.style instanceof Array) ? node.style : [node.style];
14177 margin = processSingleMargins(node, margin);
14179 if(node.margin){
14180 margin = convertMargin(node.margin);
14191 DocMeasure.prototype.convertIfBase64Image = function(node) {
14192 if (/^data:image\/(jpeg|jpg|png);base64,/.test(node.image)) {
14194 this.images[label] = node.image;
14195 node.image = label;
14199 DocMeasure.prototype.measureImage = function(node) {
14201 this.convertIfBase64Image(node);
14204 var imageSize = this.imageMeasure.measureImage(node.image);
14206 if (node.fit) {
14207 …tor = (imageSize.width / imageSize.height > node.fit[0] / node.fit[1]) ? node.fit[0] / imageSize.w…
14208 node._width = node._minWidth = node._maxWidth = imageSize.width * factor;
14209 node._height = imageSize.height * factor;
14211 node._width = node._minWidth = node._maxWidth = node.width || imageSize.width;
14212 node._height = node.height || (imageSize.height * node._width / imageSize.width);
14215 node._alignment = this.styleStack.getProperty('alignment');
14216 return node;
14219 DocMeasure.prototype.measureLeaf = function(node) {
14220 var data = this.textTools.buildInlines(node.text, this.styleStack);
14222 node._inlines = data.items;
14223 node._minWidth = data.minWidth;
14224 node._maxWidth = data.maxWidth;
14226 return node;
14229 DocMeasure.prototype.measureVerticalContainer = function(node) {
14230 var items = node.stack;
14232 node._minWidth = 0;
14233 node._maxWidth = 0;
14238 node._minWidth = Math.max(node._minWidth, items[i]._minWidth);
14239 node._maxWidth = Math.max(node._maxWidth, items[i]._maxWidth);
14242 return node;
14281 DocMeasure.prototype.measureList = function(isOrdered, node) {
14284 var items = isOrdered ? node.ol : node.ul;
14285 node._gapSize = this.gapSizeForList(isOrdered, items);
14286 node._minWidth = 0;
14287 node._maxWidth = 0;
14297 …nextItem.listMarker = this.buildMarker(isOrdered, nextItem.counter || marker, style, node._gapSize…
14300 node._minWidth = Math.max(node._minWidth, items[i]._minWidth + node._gapSize.width);
14301 node._maxWidth = Math.max(node._maxWidth, items[i]._maxWidth + node._gapSize.width);
14304 return node;
14307 DocMeasure.prototype.measureColumns = function(node) {
14308 var columns = node.columns;
14309 node._gap = this.styleStack.getProperty('columnGap') || 0;
14317 node._minWidth = measures.min + node._gap * (columns.length - 1);
14318 node._maxWidth = measures.max + node._gap * (columns.length - 1);
14320 return node;
14323 DocMeasure.prototype.measureTable = function(node) {
14324 extendTableWidths(node);
14325 node._layout = getLayout(this.tableLayouts);
14326 node._offsets = getOffsets(node._layout);
14331 for(col = 0, cols = node.table.body[0].length; col < cols; col++) {
14332 var c = node.table.widths[col];
14336 for(row = 0, rows = node.table.body.length; row < rows; row++) {
14337 var rowData = node.table.body[row];
14353 markVSpans(node.table, row, col, data.rowSpan);
14360 var measures = ColumnCalculator.measureMinMax(node.table.widths);
14362 node._minWidth = measures.min + node._offsets.total;
14363 node._maxWidth = measures.max + node._offsets.total;
14365 return node;
14377 var layout = node.layout;
14379 if (typeof node.layout === 'string' || node instanceof String) {
14384 …hLineWidth: function(i, node) { return 1; }, //return node.table.headerRows && i === node.table.he…
14385 vLineWidth: function(i, node) { return 1; },
14386 hLineColor: function(i, node) { return 'black'; },
14387 vLineColor: function(i, node) { return 'black'; },
14388 paddingLeft: function(i, node) { return 4; }, //i && 4 || 0; },
14389 paddingRight: function(i, node) { return 4; }, //(i < node.table.widths.length - 1) ? 4 : 0; },
14390 paddingTop: function(i, node) { return 2; },
14391 paddingBottom: function(i, node) { return 2; }
14402 for(var i = 0, l = node.table.widths.length; i < l; i++) {
14403 var lOffset = prevRightPadding + layout.vLineWidth(i, node) + layout.paddingLeft(i, node);
14406 prevRightPadding = layout.paddingRight(i, node);
14409 totalOffset += prevRightPadding + layout.vLineWidth(node.table.widths.length, node);
14423 var currentMinMax = getMinMax(span.col, span.span, node._offsets);
14431 node.table.widths[span.col + j]._minWidth += q;
14439 node.table.widths[span.col + j]._maxWidth += q;
14449 result.minWidth += node.table.widths[col + i]._minWidth + (i? offsets.offsets[col + i] : 0);
14450 result.maxWidth += node.table.widths[col + i]._maxWidth + (i? offsets.offsets[col + i] : 0);
14478 function extendTableWidths(node) {
14479 if (!node.table.widths) {
14480 node.table.widths = 'auto';
14483 if (typeof node.table.widths === 'string' || node.table.widths instanceof String) {
14484 node.table.widths = [ node.table.widths ];
14486 while(node.table.widths.length < node.table.body[0].length) {
14487 node.table.widths.push(node.table.widths[node.table.widths.length - 1]);
14491 for(var i = 0, l = node.table.widths.length; i < l; i++) {
14492 var w = node.table.widths[i];
14494 node.table.widths[i] = { width: w };
14500 DocMeasure.prototype.measureCanvas = function(node) {
14503 for(var i = 0, l = node.canvas.length; i < l; i++) {
14504 var vector = node.canvas[i];
14528 node._minWidth = node._maxWidth = w;
14529 node._minHeight = node._maxHeight = h;
14531 return node;
14534 DocMeasure.prototype.measureQr = function(node) {
14535 node = qrEncoder.measure(node);
14536 node._alignment = this.styleStack.getProperty('alignment');
14537 return node;
15926 function measure(node) {
15927 var cd = buildCanvas(node.qr, node);
15928 node._canvas = cd.canvas;
15929node._width = node._height = node._minWidth = node._maxWidth = node._minHeight = node._maxHeight =…
15930 return node;
23800 var node; /* new node being created */
23825 node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);
23826 tree[node * 2]/*.Freq*/ = 1;
23827 s.depth[node] = 0;
23831 s.static_len -= stree[node*2 + 1]/*.Len*/;
23845 node = elems; /* next internal node of the tree */
23860 tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;
23861 s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;
23862 tree[n*2 + 1]/*.Dad*/ = tree[m*2 + 1]/*.Dad*/ = node;
23865 s.heap[1/*SMALLEST*/] = node++;
66327 , click = function(node) {
66333 node.dispatchEvent(event);