Commit 4b699ae2 authored by Robert Knight's avatar Robert Knight

Add comments in response to review feedback

Clarify why `fitSideBySide` is re-run and why the `html_side_by_side`
flag is forcibly enabled for VS.
parent 3efd1862
......@@ -58,6 +58,9 @@ export class HTMLIntegration {
const sideBySide = features.flagEnabled('html_side_by_side');
if (sideBySide !== this._sideBySideEnabled) {
this._sideBySideEnabled = sideBySide;
// `fitSideBySide` is normally called by Guest when the sidebar layout
// changes. When the feature flag changes, we need to re-run the method.
if (this._lastLayout) {
this.fitSideBySide(this._lastLayout);
}
......
......@@ -208,7 +208,12 @@ export class VitalSourceContentIntegration {
*/
constructor(container = document.body) {
const features = new FeatureFlags();
// Forcibly enable the side-by-side feature for VS books. This feature is
// only behind a flag for regular web pages, which are typically more
// complex and varied than EPUB books.
features.update({ html_side_by_side: true });
this._htmlIntegration = new HTMLIntegration({ container, features });
this._listeners = new ListenerCollection();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment