Created
June 27, 2016 09:55
-
-
Save foobarable/948da622225fd34966f810d37e34f0e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//prefix is image path of viewer | |
var prefix = opts.prefixUrl; | |
//create button to add to viewer | |
var previousButton = new OpenSeadragon.Button({ | |
tooltip: 'previous Image', | |
srcRest: prefix + 'previous_rest.png', | |
srcGroup: prefix + 'previous_grouphover.png', | |
srcHover: prefix + 'previous_hover.png', | |
srcDown: prefix + 'previous_pressed.png', | |
onRelease: function() { | |
console.log("foo"); | |
} | |
}); | |
var nextButton = new OpenSeadragon.Button({ | |
tooltip: 'next Image', | |
srcRest: prefix + 'next_rest.png', | |
srcGroup: prefix + 'next_grouphover.png', | |
srcHover: prefix + 'next_hover.png', | |
srcDown: prefix + 'next_pressed.png', | |
onRelease: function() { | |
console.log("bar"); | |
} | |
}); | |
scope.osd.addControl(previousButton.element, { | |
anchor: OpenSeadragon.ControlAnchor.TOP_LEFT, | |
}); | |
scope.osd.addControl(nextButton.element, { | |
anchor: OpenSeadragon.ControlAnchor.TOP_LEFT | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment