From 202482519a69086070423af41653b843cc3b88fa Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Sat, 3 Sep 2016 17:01:25 -0400 Subject: [PATCH] Disable caching to save memory, fix event.of hack, remove console.log --- development_server.js | 3 --- modules/behavior/drag.js | 6 +++--- modules/ui/raw_tag_editor.js | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/development_server.js b/development_server.js index bb2b9220b..be5800c2e 100644 --- a/development_server.js +++ b/development_server.js @@ -9,7 +9,6 @@ var http = require('http'); var gaze = require('gaze'); var ecstatic = require('ecstatic'); -var cache; var building = false; @@ -51,7 +50,6 @@ function build() { rollup.rollup({ entry: './modules/id.js', - cache: cache, plugins: [ nodeResolve({ jsnext: true, main: true, browser: false @@ -62,7 +60,6 @@ function build() { }).then(function (bundle) { console.timeEnd('Rebuilt'); - cache = bundle; bundle.write({ format: 'iife', dest: 'dist/iD.js', diff --git a/modules/behavior/drag.js b/modules/behavior/drag.js index 0488ae4ca..a43e8d129 100644 --- a/modules/behavior/drag.js +++ b/modules/behavior/drag.js @@ -30,7 +30,7 @@ export function drag() { filter = null, event_, target, surface; - event.of = function(thiz, argumentz) { + function eventOf(thiz, argumentz) { return function(e1) { var e0 = e1.sourceEvent = d3.event; e1.target = drag; @@ -63,7 +63,7 @@ export function drag() { function mousedown() { target = this; - event_ = event.call('of', target, arguments); + event_ = eventOf(target, arguments); var eventTarget = d3.event.target, touchId = d3.event.touches ? d3.event.changedTouches[0].identifier : null, offset, @@ -192,7 +192,7 @@ export function drag() { drag.target = function() { if (!arguments.length) return target; target = arguments[0]; - event_ = event.call('of', target, Array.prototype.slice.call(arguments, 1)); + event_ = eventOf(target, Array.prototype.slice.call(arguments, 1)); return drag; }; diff --git a/modules/ui/raw_tag_editor.js b/modules/ui/raw_tag_editor.js index 97aff8d4e..ec5ebf86b 100644 --- a/modules/ui/raw_tag_editor.js +++ b/modules/ui/raw_tag_editor.js @@ -115,7 +115,7 @@ export function RawTagEditor(context) { .attr('title', function(d) { return d.key; }) .on('blur', keyChange) .on('change', keyChange), - function(d) { console.log(d, this); return d.key; } + function(d) { return d.key; } ); getSetValue($items.select('input.value')