mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-17 22:24:49 +02:00
Convert constructor argument to accessor
This commit is contained in:
@@ -103,7 +103,8 @@ iD.modes.Select = function(context, selection) {
|
||||
}
|
||||
|
||||
if (singular()) {
|
||||
inspector = iD.ui.Inspector(context, singular())
|
||||
inspector = iD.ui.Inspector(context)
|
||||
.entityID(singular().id)
|
||||
.newFeature(newFeature);
|
||||
|
||||
wrap.call(inspector);
|
||||
|
||||
+10
-2
@@ -1,11 +1,13 @@
|
||||
iD.ui.Inspector = function(context, entity) {
|
||||
iD.ui.Inspector = function(context) {
|
||||
var presetList,
|
||||
entityEditor,
|
||||
entityID,
|
||||
newFeature = false;
|
||||
|
||||
function inspector(selection) {
|
||||
|
||||
var reselect = selection.html();
|
||||
var reselect = selection.html(),
|
||||
entity = context.entity(entityID);
|
||||
|
||||
selection
|
||||
.html('')
|
||||
@@ -90,6 +92,12 @@ iD.ui.Inspector = function(context, entity) {
|
||||
});
|
||||
};
|
||||
|
||||
inspector.entityID = function(_) {
|
||||
if (!arguments.length) return entityID;
|
||||
entityID = _;
|
||||
return inspector;
|
||||
};
|
||||
|
||||
inspector.newFeature = function(_) {
|
||||
if (!arguments.length) return newFeature;
|
||||
newFeature = _;
|
||||
|
||||
Reference in New Issue
Block a user