mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
some cleanup and refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
655c58be91
commit
239d4a86d7
@ -365,6 +365,8 @@ stretching in width... */
|
|||||||
border: solid 5px red;
|
border: solid 5px red;
|
||||||
background: none;
|
background: none;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
/* pass events through... (do we need IE10-?) */
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
.marker {
|
.marker {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
|
|||||||
@ -519,6 +519,9 @@ stretching in width... */
|
|||||||
border: solid 5px red;
|
border: solid 5px red;
|
||||||
background: none;
|
background: none;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
|
|
||||||
|
/* pass events through... (do we need IE10-?) */
|
||||||
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.marker {
|
.marker {
|
||||||
|
|||||||
@ -107,6 +107,7 @@ core.ImageGridFeatures.Feature('viewer-testing', [
|
|||||||
'ui-url-history',
|
'ui-url-history',
|
||||||
|
|
||||||
'ui-browse-actions',
|
'ui-browse-actions',
|
||||||
|
'ui-context-action-menu',
|
||||||
'ui-widget-test',
|
'ui-widget-test',
|
||||||
|
|
||||||
// ui control...
|
// ui control...
|
||||||
|
|||||||
@ -347,6 +347,9 @@ module.StatusBar = core.ImageGridFeatures.Feature({
|
|||||||
tag: 'ui-status-bar',
|
tag: 'ui-status-bar',
|
||||||
depends: [
|
depends: [
|
||||||
'ui',
|
'ui',
|
||||||
|
|
||||||
|
// XXX this is here to enable context menu...
|
||||||
|
'ui-browse-actions',
|
||||||
],
|
],
|
||||||
|
|
||||||
actions: StatusBarActions,
|
actions: StatusBarActions,
|
||||||
|
|||||||
@ -179,6 +179,54 @@ module.BrowseActions = core.ImageGridFeatures.Feature({
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------
|
||||||
|
|
||||||
|
var ContextActionMenu =
|
||||||
|
module.ContextActionMenu = core.ImageGridFeatures.Feature({
|
||||||
|
title: '',
|
||||||
|
doc: '',
|
||||||
|
|
||||||
|
tag: 'ui-context-action-menu',
|
||||||
|
depends: [
|
||||||
|
'ui-browse-actions',
|
||||||
|
],
|
||||||
|
|
||||||
|
handlers: [
|
||||||
|
['updateImage',
|
||||||
|
function(){
|
||||||
|
var that = this
|
||||||
|
var img = this.ribbons.getImage(gid)
|
||||||
|
|
||||||
|
!img.data('context-menu')
|
||||||
|
&& img
|
||||||
|
.data('context-menu', true)
|
||||||
|
.on('contextmenu', function(){
|
||||||
|
event.preventDefault()
|
||||||
|
event.stopPropagation()
|
||||||
|
|
||||||
|
that.browseActions('/Image/')
|
||||||
|
})
|
||||||
|
}],
|
||||||
|
['load',
|
||||||
|
function(){
|
||||||
|
var that = this
|
||||||
|
var viewer = this.ribbons.viewer
|
||||||
|
|
||||||
|
!viewer.data('context-menu')
|
||||||
|
&& viewer
|
||||||
|
.data('context-menu', true)
|
||||||
|
.on('contextmenu', function(){
|
||||||
|
event.preventDefault()
|
||||||
|
event.stopPropagation()
|
||||||
|
|
||||||
|
that.browseActions()
|
||||||
|
})
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
// XXX make this not applicable to production...
|
// XXX make this not applicable to production...
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,10 @@ var OverlayClassPrototype = {
|
|||||||
.on(options.nonPropagatedEvents.join(' '), function(){
|
.on(options.nonPropagatedEvents.join(' '), function(){
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
})
|
})
|
||||||
|
.on('contextmenu', function(){
|
||||||
|
event.preventDefault()
|
||||||
|
event.stopPropagation()
|
||||||
|
})
|
||||||
.append($('<div>')
|
.append($('<div>')
|
||||||
.addClass('content')
|
.addClass('content')
|
||||||
.click(function(){
|
.click(function(){
|
||||||
@ -31,7 +35,6 @@ var OverlayClassPrototype = {
|
|||||||
.on('contextmenu', function(){
|
.on('contextmenu', function(){
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
return false
|
|
||||||
})
|
})
|
||||||
.append(client))
|
.append(client))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user