Created
June 27, 2016 11:16
-
-
Save foobarable/39685a969619460179a1fbf26d28bce3 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("Release"); | |
}, | |
onBlur: function() { | |
console.log("Blur"); | |
}, | |
onEnter: function() { | |
console.log("Enter"); | |
}, | |
onClick: function() { | |
console.log("Click"); | |
}, | |
onExit: function() { | |
console.log("Exit"); | |
}, | |
onPress: function() { | |
console.log("Press"); | |
}, | |
onFocus: function() { | |
console.log("Focus"); | |
}, | |
}); | |
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("Release"); | |
}, | |
onBlur: function() { | |
console.log("Blur"); | |
}, | |
onEnter: function() { | |
console.log("Enter"); | |
}, | |
onClick: function() { | |
console.log("Click"); | |
}, | |
onExit: function() { | |
console.log("Exit"); | |
}, | |
onPress: function() { | |
console.log("Press"); | |
}, | |
onFocus: function() { | |
console.log("Focus"); | |
}, | |
}); | |
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