mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-11 19:00:00 +01:00
Map types to html types (#754)
* fix insert step button * add dist * add new function * remove console logs * refactor * Setup UI testing (#720) * default sequencer ui test * default step ui test suite * intermediate step ui test * preview ui test suite * url methods test suite * add set url params method test suite * argument call tests * test directory refactor * travis fix * CLI code refactor (#665) * CLI refactor * es6 rollback * Travis fix * syntax fix * clustered require statements * travis debug * travis debug * Added line that selects the "More modules..." after adding a step. (#713) * Added line making module selection correct after adding a step * Added line with appropriate module selection * Add: Module tests (#748) * WIP * module testing harness * adjustments * Update package-lock.json * Bump jsqr from 1.1.1 to 1.2.0 (#749) Bumps [jsqr](https://github.com/cozmo/jsQR) from 1.1.1 to 1.2.0. - [Release notes](https://github.com/cozmo/jsQR/releases) - [Commits](https://github.com/cozmo/jsQR/commits) Signed-off-by: dependabot[bot] <support@dependabot.com> * refactor without spread syntax
This commit is contained in:
committed by
Jeffrey Warren
parent
ac57b32ec6
commit
1e08d7c1da
@@ -11,6 +11,7 @@
|
||||
var intermediateHtmlStepUi = require('./intermediateHtmlStepUi.js');
|
||||
var urlHash = require('./urlHash.js');
|
||||
var _ = require('lodash');
|
||||
var mapHtmlTypes = require('./mapHtmltypes');
|
||||
|
||||
function DefaultHtmlStepUi(_sequencer, options) {
|
||||
|
||||
@@ -71,7 +72,7 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
||||
for (var paramName in merged) {
|
||||
var isInput = inputs.hasOwnProperty(paramName);
|
||||
var html = "";
|
||||
var inputDesc = isInput ? inputs[paramName] : {};
|
||||
var inputDesc = isInput ? mapHtmlTypes(inputs[paramName]) : {};
|
||||
if (!isInput) {
|
||||
html += '<span class="output"></span>';
|
||||
} else if (inputDesc.type.toLowerCase() == "select") {
|
||||
@@ -99,7 +100,7 @@ function DefaultHtmlStepUi(_sequencer, options) {
|
||||
'"max="' +
|
||||
inputDesc.max +
|
||||
'"step="' +
|
||||
inputDesc.step + '">' + '<span>' + paramVal + '</span>';
|
||||
(inputDesc.step ? inputDesc.step : 1)+ '">' + '<span>' + paramVal + '</span>';
|
||||
|
||||
}
|
||||
else html += '">';
|
||||
|
||||
Reference in New Issue
Block a user