How to use the node.all function in node

To help you get started, we’ve selected a few node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kissyteam / kissy / src / overlay / coverage / src / overlay / extension / overlay-effect.js View on Github external
function processTarget(self, show) {
    _$jscoverage['/overlay/extension/overlay-effect.js'].functionData[2]++;
    _$jscoverage['/overlay/extension/overlay-effect.js'].lineData[26]++;
    if (visit27_26_1(self.__effectGhost)) {
      _$jscoverage['/overlay/extension/overlay-effect.js'].lineData[27]++;
      self.__effectGhost.stop(1, 1);
    }
    _$jscoverage['/overlay/extension/overlay-effect.js'].lineData[30]++;
    var el = self.$el, $ = require('node').all, effectCfg = self.get('effect'), target = $(effectCfg.target), duration = effectCfg.duration, targetBox = {
  width: target.width(), 
  height: target.height()}, targetOffset = target.offset(), elBox = {
  width: el.width(), 
  height: el.height()}, elOffset = el.offset(), from, to, fromOffset, toOffset, ghost = getGhost(self), easing = effectCfg.easing;
    _$jscoverage['/overlay/extension/overlay-effect.js'].lineData[49]++;
    ghost.insertAfter(el);
    _$jscoverage['/overlay/extension/overlay-effect.js'].lineData[51]++;
    if (visit28_51_1(show)) {
      _$jscoverage['/overlay/extension/overlay-effect.js'].lineData[52]++;
      from = targetBox;
      _$jscoverage['/overlay/extension/overlay-effect.js'].lineData[53]++;
      fromOffset = targetOffset;
      _$jscoverage['/overlay/extension/overlay-effect.js'].lineData[54]++;
      to = elBox;
      _$jscoverage['/overlay/extension/overlay-effect.js'].lineData[55]++;
      toOffset = elOffset;
github kissyteam / kissy / src / editor / sub-modules / plugin / separator / coverage / src / separator.js View on Github external
pluginRenderUI: function(editor) {
  _$jscoverage['/separator.js'].functionData[2]++;
  _$jscoverage['/separator.js'].lineData[17]++;
  $('<span>&nbsp;' + '</span>').appendTo(editor.get('toolBarEl'));
}});
  _$jscoverage['/separator.js'].lineData[21]++;
github kissyteam / kissy / src / editor / sub-modules / plugin / contextmenu / coverage / src / contextmenu.js View on Github external
function showNow(ev) {
    _$jscoverage['/contextmenu.js'].functionData[7]++;
    _$jscoverage['/contextmenu.js'].lineData[56]++;
    var t = $(ev.target);
    _$jscoverage['/contextmenu.js'].lineData[62]++;
    var x = ev.pageX, y = ev.pageY;
    _$jscoverage['/contextmenu.js'].lineData[64]++;
    if (visit5_64_1(!x)) {
      _$jscoverage['/contextmenu.js'].lineData[65]++;
      return;
    } else {
      _$jscoverage['/contextmenu.js'].lineData[67]++;
      var translate = Editor.Utils.getXY({
  left: x, 
  top: y}, self);
      _$jscoverage['/contextmenu.js'].lineData[71]++;
      x = translate.left;
      _$jscoverage['/contextmenu.js'].lineData[72]++;
      y = translate.top;
    }
github kissyteam / kissy / src / scroll-view / sub-modules / drag / coverage / src / drag.js View on Github external
_$jscoverage['/drag.js'].lineData[8]++;
  var Node = require('node');
  _$jscoverage['/drag.js'].lineData[9]++;
  var Anim = require('anim');
  _$jscoverage['/drag.js'].lineData[11]++;
  var OUT_OF_BOUND_FACTOR = 0.5;
  _$jscoverage['/drag.js'].lineData[13]++;
  var PIXEL_THRESH = 3;
  _$jscoverage['/drag.js'].lineData[15]++;
  var Gesture = Node.Gesture;
  _$jscoverage['/drag.js'].lineData[17]++;
  var SWIPE_SAMPLE_INTERVAL = 300;
  _$jscoverage['/drag.js'].lineData[19]++;
  var MAX_SWIPE_VELOCITY = 6;
  _$jscoverage['/drag.js'].lineData[21]++;
  var $document = Node.all(document);
  _$jscoverage['/drag.js'].lineData[23]++;
  function onDragStart(self, e, scrollType) {
    _$jscoverage['/drag.js'].functionData[1]++;
    _$jscoverage['/drag.js'].lineData[24]++;
    var now = e.timeStamp, scroll = self.get('scroll' + S.ucfirst(scrollType));
    _$jscoverage['/drag.js'].lineData[26]++;
    self.startScroll[scrollType] = scroll;
    _$jscoverage['/drag.js'].lineData[27]++;
    self.swipe[scrollType].startTime = now;
    _$jscoverage['/drag.js'].lineData[28]++;
    self.swipe[scrollType].scroll = scroll;
  }
  _$jscoverage['/drag.js'].lineData[31]++;
  function onDragScroll(self, e, scrollType, startMousePos) {
    _$jscoverage['/drag.js'].functionData[2]++;
    _$jscoverage['/drag.js'].lineData[32]++;
github kissyteam / kissy / build / scroll-view / drag.js View on Github external
KISSY.add("scroll-view/drag", ["./base", "node", "anim"], function(S, require) {
  var ScrollViewBase = require("./base");
  var Node = require("node");
  var Anim = require("anim");
  var OUT_OF_BOUND_FACTOR = 0.5;
  var PIXEL_THRESH = 3;
  var Gesture = Node.Gesture;
  var SWIPE_SAMPLE_INTERVAL = 300;
  var MAX_SWIPE_VELOCITY = 6;
  var $document = Node.all(document);
  function onDragStart(self, e, scrollType) {
    var now = e.timeStamp, scroll = self.get("scroll" + S.ucfirst(scrollType));
    self.startScroll[scrollType] = scroll;
    self.swipe[scrollType].startTime = now;
    self.swipe[scrollType].scroll = scroll
  }
  function onDragScroll(self, e, scrollType, startMousePos) {
    if(forbidDrag(self, scrollType)) {
      return
    }
    var pos = {pageX:e.pageX, pageY:e.pageY};
    var pageOffsetProperty = scrollType === "left" ? "pageX" : "pageY", lastPageXY = self.lastPageXY;
    var diff = pos[pageOffsetProperty] - startMousePos[pageOffsetProperty], eqWithLastPoint, scroll = self.startScroll[scrollType] - diff, bound, now = e.timeStamp, minScroll = self.minScroll, maxScroll = self.maxScroll, lastDirection = self.lastDirection, swipe = self.swipe, direction;
    if(lastPageXY[pageOffsetProperty]) {
      eqWithLastPoint = pos[pageOffsetProperty] === lastPageXY[pageOffsetProperty];
      direction = pos[pageOffsetProperty] - lastPageXY[pageOffsetProperty] > 0
github kissyteam / kissy / src / menu / coverage / src / menu / menuitem.js View on Github external
var el = self.$el, p = el.parent(function(e) {
  _$jscoverage['/menu/menuitem.js'].functionData[4]++;
  _$jscoverage['/menu/menuitem.js'].lineData[62]++;
  return visit31_62_1($(e).css('overflow') !== 'visible');
}, parent.get('el').parent());
    _$jscoverage['/menu/menuitem.js'].lineData[64]++;
github kissyteam / kissy / build / component / control.js View on Github external
}}, zIndex:{view:1}, render:{}, visible:{sync:0, value:true, view:1}, srcNode:{setter:function(v) {
    return Node.all(v)
  }}, handleGestureEvents:{value:true}, focusable:{value:true, view:1}, allowTextSelection:{value:false}, activeable:{value:true}, focused:{view:1}, active:{view:1, value:false}, highlighted:{view:1, value:false}, prefixCls:{view:1, value:S.config("component/prefixCls") || "ks-"}, prefixXClass:{}, parent:{setter:function(p, prev) {
    if(prev = this.get("parent")) {
github kissyteam / kissy / src / editor / sub-modules / plugin / link / coverage / src / link.js View on Github external
function checkLink(lastElement) {
    _$jscoverage['/link.js'].functionData[1]++;
    _$jscoverage['/link.js'].lineData[27]++;
    lastElement = $(lastElement);
    _$jscoverage['/link.js'].lineData[28]++;
    return lastElement.closest('a', undefined);
  }
  _$jscoverage['/link.js'].lineData[31]++;
github kissyteam / kissy / src / editor / sub-modules / plugin / smiley / coverage / src / smiley.js View on Github external
smiley.get('el').on('click', function(ev) {
  _$jscoverage['/smiley.js'].functionData[7]++;
  _$jscoverage['/smiley.js'].lineData[59]++;
  var t = $(ev.target), icon;
  _$jscoverage['/smiley.js'].lineData[61]++;
  if (visit5_61_1(visit6_61_2(t.nodeName() === 'a') &amp;&amp; (icon = t.attr('data-icon')))) {
    _$jscoverage['/smiley.js'].lineData[63]++;
    var img = $('<img src="' + icon + '">', null, editor.get('document')[0]);
    _$jscoverage['/smiley.js'].lineData[67]++;
    editor.insertElement(img);
  }
});
      _$jscoverage['/smiley.js'].lineData[70]++;
github kissyteam / kissy / src / editor / sub-modules / plugin / flash-common / utils / coverage / src / utils.js View on Github external
_$jscoverage['/utils.js'].functionData[4]++;
  _$jscoverage['/utils.js'].lineData[40]++;
  var render = Dom.create('<div style="' + 'position:absolute;left:-9999px;top:-9999px;' + '"></div>', undefined, cfg.document);
  _$jscoverage['/utils.js'].lineData[43]++;
  cfg.htmlMode = 'full';
  _$jscoverage['/utils.js'].lineData[44]++;
  Dom.append(render, cfg.document.body);
  _$jscoverage['/utils.js'].lineData[45]++;
  cfg.render = render;
  _$jscoverage['/utils.js'].lineData[46]++;
  var swf = new SWF(cfg);
  _$jscoverage['/utils.js'].lineData[47]++;
  Dom.remove(render);
  _$jscoverage['/utils.js'].lineData[48]++;
  return {
  el: $(swf.get('el')), 
  html: swf.get('html')};
}};
  _$jscoverage['/utils.js'].lineData[54]++;