Disable caching to save memory, fix event.of hack, remove console.log

This commit is contained in:
Tom MacWright
2016-09-03 17:01:25 -04:00
parent c5b3a16d3a
commit 202482519a
3 changed files with 4 additions and 7 deletions
-3
View File
@@ -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',
+3 -3
View File
@@ -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;
};
+1 -1
View File
@@ -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')