Skip to content

Commit 7255eb3

Browse files
fix column coordinates error
1 parent 20de12c commit 7255eb3

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lib/Toolbar.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -426,14 +426,13 @@ class Toolbar {
426426
// change this to use the context instead
427427
this.context.setupDataHarmonizers({ template_path, schema_name, template_name, schema, exportFormats, languages, schemaClass }).then(async (context) => {
428428

429+
let columnCoordinates;
429430
const dh = context.getCurrentDataHarmonizer();
430-
console.log(dh);
431-
432431
if (!languages) languages = await dh.getLanguages(template_name);
433432
if (!schemaClass) schemaClass = schema.classes[template_name];
434433
if (!columnCoordinates) columnCoordinates = dh.getColumnCoordinates();
435434

436-
const updateGUI = ({ template_path, schema_name, template_name, schema, exportFormats, languages, schemaClass }) => {
435+
const updateGUI = ({ template_path, schema_name, template_name, schema, exportFormats, languages, schemaClass, columnCoordinates }) => {
437436

438437
const languageSelect = $('#select-language-localization').empty();
439438
for (const { langcode, nativeName } of Object.values(languages)) {
@@ -462,7 +461,6 @@ class Toolbar {
462461
helpSop.hide();
463462
}
464463

465-
const columnCoordinates = dh.getColumnCoordinates();
466464
const sectionMenu = $('#section-menu').empty();
467465
dh.template.forEach((section, index) => {
468466
sectionMenu.append(
@@ -477,7 +475,7 @@ class Toolbar {
477475

478476
};
479477

480-
updateGUI({ schema_name, template_name, schema, exportFormats, languages, schemaClass });
478+
updateGUI({ schema_name, template_name, schema, exportFormats, languages, schemaClass, columnCoordinates });
481479

482480
});
483481

web/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ class AppContext {
412412
// dhToolbarRoot.innerHTML = '';
413413
}
414414

415-
async setupDataHarmonizers({ template_path, schema_name, template_name, schema, exportFormats }) {
415+
async setupDataHarmonizers({ template_path, schema_name, template_name, schema, exportFormats, schemaClass, columnCoordinates }) {
416416

417417
// TODO refactor
418418
this.appConfig = new AppConfig(template_path);

0 commit comments

Comments
 (0)