mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 17:14:04 +02:00
Disable caching to save memory, fix event.of hack, remove console.log
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user