Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature AUT-3769 Support centering image #411

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"@oat-sa/tao-core-libs": "^1.0.0",
"@oat-sa/tao-core-sdk": "^3.0.0",
"@oat-sa/tao-core-shared-libs": "^1.4.1",
"@oat-sa/tao-core-ui": "^3.1.0",
"@oat-sa/tao-core-ui": "^3.6.0",
"@oat-sa/tao-item-runner": "^1.0.0",
"@oat-sa/tao-qunit-testrunner": "^2.0.0",
"async": "^0.2.10",
Expand Down
3 changes: 2 additions & 1 deletion src/qtiCommonRenderer/renderers/Figure.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import _ from 'lodash';
import containerHelper from 'taoQtiItem/qtiCommonRenderer/helpers/container';
import imageTpl from 'taoQtiItem/qtiCommonRenderer/tpl/figure-image';
import widgetTpl from 'taoQtiItem/qtiCommonRenderer/tpl/figure-widget';
import { FLOAT_LEFT_CLASS, FLOAT_RIGHT_CLASS, CENTER_CLASS } from 'ui/mediaEditor/plugins/mediaAlignment/helper';

const DISABLE_FIGURE_WIDGET = context.featureFlags['FEATURE_FLAG_DISABLE_FIGURE_WIDGET'];

Expand All @@ -33,7 +34,7 @@ export default {
}

let showFigure = false;
if (data.attributes.class && ['wrap-left', 'wrap-right'].includes(data.attributes.class)) {
if (data.attributes.class && [FLOAT_LEFT_CLASS, FLOAT_RIGHT_CLASS, CENTER_CLASS].includes(data.attributes.class)) {
olga-kulish marked this conversation as resolved.
Show resolved Hide resolved
showFigure = true;
} else {
_.some(elem.bdy['elements'], childElement => {
Expand Down
Loading