Skip to content

Commit

Permalink
issue/2799 Removed redundant behaviour (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster authored May 23, 2022
1 parent 450efc9 commit 9e5e886
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ The attributes listed below are used in *components.json* to configure **Narrati

>>**attribution** (string): Optional text to be displayed as an [attribution](https://wiki.creativecommons.org/Best_practices_for_attribution). By default it is displayed below the image. Adjust positioning by modifying CSS. Text can contain HTML tags, e.g., `Copyright © 2015 by <b>Lukasz 'Severiaan' Grela</b>`.

>**strapline** (string): This text is displayed as a title above the image when `Adapt.device.screenSize` is `small` (i.e., when viewed on mobile devices).
>**strapline** (string): This text is displayed as a title above the image when `device.screenSize` is `small` (i.e., when viewed on mobile devices).

### Accessibility
**Narrative** has been assigned a label using the [aria-label](https://github.com/adaptlearning/adapt_framework/wiki/Aria-Labels) attribute: **ariaRegion**. This label is not a visible element. It is utilized by assistive technology such as screen readers. Should the region's text need to be customised, it can be found within the **globals** object in [*properties.schema*](https://github.com/adaptlearning/adapt-contrib-narrative/blob/master/properties.schema).
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "adapt-contrib-narrative",
"version": "6.5.4",
"framework": ">=5.17.2",
"framework": ">=5.19.1",
"homepage": "https://github.com/adaptlearning/adapt-contrib-narrative",
"bugs": "https://github.com/adaptlearning/adapt-contrib-narrative/issues",
"component" : "narrative",
Expand Down
8 changes: 5 additions & 3 deletions js/NarrativeView.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import Adapt from 'core/js/adapt';
import components from 'core/js/components';
import a11y from 'core/js/a11y';
import ComponentView from 'core/js/views/componentView';
import device from 'core/js/device';
import notify from 'core/js/notify';
import ComponentView from 'core/js/views/componentView';
import MODE from './modeEnum';

class NarrativeView extends ComponentView {
Expand Down Expand Up @@ -175,7 +177,7 @@ class NarrativeView extends ComponentView {
}

replaceWithHotgraphic() {
const HotgraphicView = Adapt.getViewClass('hotgraphic');
const HotgraphicView = components.getViewClass('hotgraphic');
if (!HotgraphicView) return;

const model = this.prepareHotgraphicModel();
Expand Down Expand Up @@ -294,7 +296,7 @@ class NarrativeView extends ComponentView {

openPopup() {
const currentItem = this.model.getActiveItem();
Adapt.notify.popup({
notify.popup({
title: currentItem.get('title'),
body: currentItem.get('body')
});
Expand Down
4 changes: 2 additions & 2 deletions js/adapt-contrib-narrative.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Adapt from 'core/js/adapt';
import components from 'core/js/components';
import NarrativeModel from './NarrativeModel';
import NarrativeView from './NarrativeView';

export default Adapt.register('narrative', {
export default components.register('narrative', {
model: NarrativeModel,
view: NarrativeView
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "adapt-contrib-narrative",
"version": "6.5.4",
"framework": ">=5.17.2",
"framework": ">=5.19.1",
"homepage": "https://github.com/adaptlearning/adapt-contrib-narrative",
"bugs": "https://github.com/adaptlearning/adapt-contrib-narrative/issues",
"component" : "narrative",
Expand Down

0 comments on commit 9e5e886

Please sign in to comment.