Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #195 from indirectlylit/update-rtl-api
Browse files Browse the repository at this point in the history
update content direction API to pull information from mixin
  • Loading branch information
jonboiser authored Jul 9, 2019
2 parents ae234c2 + 3835ffd commit d8176df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion kolibri_exercise_perseus_plugin/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.1.8"
__version__ = "1.2.0"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</div>
<div
id="problem-area"
:dir="dir"
:dir="contentDirection"
>
<div id="workarea" style="margin-left: 0px"></div>
</div>
Expand Down Expand Up @@ -46,18 +46,18 @@
</div>


<div v-if="hinted" id="hintlabel" :dir="dir">{{ $tr("hintLabel") }}</div>
<div id="hintsarea" :dir="dir" style="margin-left: 0px"></div>
<div v-if="hinted" id="hintlabel" :dir="contentDirection">{{ $tr("hintLabel") }}</div>
<div id="hintsarea" :dir="contentDirection" style="margin-left: 0px"></div>

<div style="clear: both;"></div>

</div>

<transition name="expand">
<div v-show="message" id="message" :dir="dir">{{ message }}</div>
<div v-show="message" id="message" :dir="contentDirection">{{ message }}</div>
</transition>

<div id="answer-area-wrap" :dir="dir" :style="background">
<div id="answer-area-wrap" :dir="contentDirection" :style="background">
<div id="answer-area">
<div class="info-box">
<div id="solutionarea"></div>
Expand All @@ -83,7 +83,7 @@

<!-- Need a DOM mount point for reactDOM to attach to,
but Perseus renders weirdly so doesn't use this -->
<div id="perseus-container" ref="perseusContainer" :dir="dir"></div>
<div id="perseus-container" ref="perseusContainer" :dir="contentDirection"></div>
</div>
</div>

Expand Down Expand Up @@ -186,9 +186,6 @@
anyHints() {
return this.allowHints && (this.itemRenderer ? this.itemRenderer.getNumHints() : 0);
},
dir() {
return getContentLangDir(this.lang);
},
},
watch: {
itemId: 'loadItemData',
Expand Down Expand Up @@ -219,7 +216,7 @@
perseus.init({ skipMathJax: true, loadExtraWidgets: true })
);
// Try to load the appropriate directional CSS for the particular content
const cssPromise = this.$options.contentModule.loadDirectionalCSS(this.dir);
const cssPromise = this.$options.contentModule.loadDirectionalCSS(this.contentDirection);
Promise.all([initPromise, cssPromise]).then(() => {
this.loadItemData();
this.$emit('startTracking');
Expand Down

0 comments on commit d8176df

Please sign in to comment.