Skip to content

Commit

Permalink
Chore: Bundling annotations.css separately from preview.css (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
pramodsum authored May 9, 2017
1 parent c735f38 commit 699ed56
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/lib/annotations/Annotator.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Notification from '../Notification';
import AnnotationService from './AnnotationService';
import * as constants from './annotationConstants';
import { CLASS_ACTIVE } from '../constants';
import './Annotator.scss';

@autobind
class Annotator extends EventEmitter {
Expand Down
3 changes: 2 additions & 1 deletion src/lib/viewers/BaseViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
} from '../constants';

const ANNOTATIONS_JS = ['annotations.js'];
const ANNOTATIONS_CSS = ['annotations.css'];
const LOAD_TIMEOUT_MS = 180000; // 3m
const RESIZE_WAIT_TIME_IN_MILLIS = 300;

Expand Down Expand Up @@ -74,7 +75,7 @@ class BaseViewer extends EventEmitter {
// the assets are available, the showAnnotations flag is true, and the
// expiring embed is not a shared link
if (this.areAnnotationsEnabled() && !this.options.sharedLink) {
this.loadAssets(ANNOTATIONS_JS);
this.loadAssets(ANNOTATIONS_JS, ANNOTATIONS_CSS);
}
}

Expand Down
1 change: 0 additions & 1 deletion src/lib/viewers/doc/Document.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import '../../annotations/Annotator';
@import 'docBase';
@import './DocFindBar';

Expand Down
1 change: 0 additions & 1 deletion src/lib/viewers/doc/Presentation.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import '../../annotations/Annotator';
@import 'docBase';
@import './DocFindBar';

Expand Down
2 changes: 0 additions & 2 deletions src/lib/viewers/image/Image.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@import '../../annotations/Annotator';

.bp-image {
border: 0 none;
bottom: 0;
Expand Down

0 comments on commit 699ed56

Please sign in to comment.