function loadSpecifications() { request("specifications.json", { handleAs: 'json' }).then(function(response) { console.log("Got response", response); specifications = response.data; // Try commenting out the next line to see what happens (or doesn't happen) projector.scheduleRender(); }, function (error) { console.log("Something went wrong", error); }); }
function loadSpecifications() { request("specifications.json", { handleAs: 'json' }).then(function(response) { console.log("Got response", response); specifications = response.data; // Add updatign functions to specifications specifications.forEach(function (specification: Specification) { // Maquette requires always setting callbacks to the same function // TODO: Use a SpecifiedWidget class that supports this to better document intent specification.toggleEditor = editClicked.bind(null, specification); specification.acceptChanges = acceptChangesClicked.bind(null, specification); specification.setType = setType.bind(null, specification); specification.setText = setText.bind(null, specification); specification.setExtra = setExtra.bind(null, specification); }); // Try commenting out the next line to see what happens (or doesn't happen) projector.scheduleRender(); }, function (error) { console.log("Something went wrong", error); }); }