Skip to content

Commit

Permalink
Add center so that verovio can be rendered. Fix the error with the sy…
Browse files Browse the repository at this point in the history
…nc buttons
  • Loading branch information
chrizzor committed Jul 19, 2024
1 parent d106ada commit f6eb237
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
1 change: 1 addition & 0 deletions Resources/Public/JavaScript/PageView/ScoreControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ dlfViewerScoreControl.prototype.loadScoreData = function (scoreData, tk) {
view: new ol.View({
projection: proj,
//Center: [0, 0], center: ol.extent.getCenter(extent),
center: [0, 0],
extent: extent,
zoom: 1,
minZoom: 1,
Expand Down
12 changes: 10 additions & 2 deletions Resources/Public/JavaScript/PageView/SyncControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,16 @@ class SyncViewsControl extends ol.control.Control {

var viewerContext = options.dlfViewerObject;

button.addEventListener('click', viewerContext.syncControl.setSync(), false);
buttonUnsync.addEventListener('click', viewerContext.syncControl.unsetSync(), false);
var syncViews = function(e) {
viewerContext.syncControl.setSync();
};

var unsyncViews = function(e) {
viewerContext.syncControl.unsetSync();
};

button.addEventListener('click', syncViews, false);
buttonUnsync.addEventListener('click', unsyncViews, false);
}

}
Expand Down

0 comments on commit f6eb237

Please sign in to comment.