Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function start(){
if (!started)
{
// start watch for hash changes
if (eventSupport)
eventUtils.addHandler(global, 'hashchange', checkUrl);
else
timer = setInterval(checkUrl, CHECK_INTERVAL);
/** @cut */ if (module.exports.debug)
/** @cut */ basis.dev.log(namespace + ' started');
// mark as started and check current hash
started = true;
checkUrl();
}
}
}, this);
},
stop: function() {
// dummy
}
});
watcher.link(page, function(dataObject) {
if (this.treemap && this.opened.value) {
this.treemap.set('dataObject', dataObject);
}
});
var resizeTimeout;
addHandler(window, 'resize', function() {
clearTimeout(resizeTimeout);
resizeTimeout = setTimeout(this.resizeMap.bind(this), 300);
}, page);
module.exports = page;
if (arguments.length > 1)
handleInsert(element, createFragment.apply(0, basis.array.flatten(arrayFrom(arguments, 1))));
// attach event handlers
if (isConfig)
{
if (config.css)
{
if (!cssom)
cssom = require('basis.cssom');
cssom.setStyle(element, config.css);
}
for (var event in config)
if (typeof config[event] == 'function')
eventUtils.addHandler(element, event, config[event], element);
}
// return an element
return element;
}
addTargetElementHandlers: function(){
Event.addHandler(this.targetElement, 'mousedown', this.onMouseDown, this);
Event.addHandler(this.targetElement, 'touchstart', this.onMouseDown, this);
},
removeTargetElementHandlers: function(){
function startInspect(){
if (!inspectMode.value)
{
updateOnScroll();
inspectMode.set(true);
highlight();
domEventUtils.addGlobalHandler('scroll', updateOnScroll);
domEventUtils.addHandler(window, 'resize', updateOnResize);
inspectBasisEvent.captureEvent('contextmenu', endInspect);
if (observer)
observer.observe(document.body, {
subtree: true,
attributes: true,
characterData: true,
childList: true
});
}
}
addTargetElementHandlers: function(){
Event.addHandler(this.targetElement, 'mousedown', this.onMouseDown, this);
Event.addHandler(this.targetElement, 'touchstart', this.onMouseDown, this);
},
removeTargetElementHandlers: function(){
emit_start: function(request){
eventUtils.addHandler(request.xhr.upload, 'progress', REQUEST_PROGRESS_HANDLER, request);
AjaxTransport.prototype.emit_start.call(this, request);
},
emit_complete: function(request){
setElement: function(element, trigger){
this.element = resolveElement(element);
trigger = resolveElement(trigger) || this.element;
if (this.trigger !== trigger)
{
if (this.trigger)
eventUtils.removeHandler(this.trigger, 'mousedown', startDrag, this);
this.trigger = trigger;
if (this.trigger)
eventUtils.addHandler(this.trigger, 'mousedown', startDrag, this);
}
},
setBase: function(baseElement){
function startWatch(){
eventUtils.addGlobalHandler('scroll', updateOnScroll);
eventUtils.addGlobalHandler('mousemove', update);
eventUtils.addGlobalHandler('pointermove', update);
eventUtils.addGlobalHandler('focus', update);
eventUtils.addGlobalHandler('focusIn', update);
eventUtils.addGlobalHandler('focusOut', update);
eventUtils.addGlobalHandler('blur', update);
eventUtils.addHandler(global, 'resize', updateOnResize);
inspectBasisEvent.captureEvent('contextmenu', function(){
activeOverlay.set();
});
if (observer)
observer.observe(document.body, {
subtree: true,
attributes: true,
characterData: true,
childList: true
});
}