mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +00:00
cleanup...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
7c890a1657
commit
c22c34a49a
@ -1449,60 +1449,6 @@ module.URLHash = core.ImageGridFeatures.Feature({
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************/
|
|
||||||
// Adds user management of different back-ends for low level ribbon
|
|
||||||
// alignment and placement...
|
|
||||||
var RibbonsPlacement =
|
|
||||||
module.RibbonsPlacement = core.ImageGridFeatures.Feature({
|
|
||||||
title: '',
|
|
||||||
doc: '',
|
|
||||||
|
|
||||||
tag: 'ui-ribbons-placement',
|
|
||||||
depends: [ 'ui' ],
|
|
||||||
|
|
||||||
config: {
|
|
||||||
// NOTE: the adapter names bust be registered in the ribbons module
|
|
||||||
// ...not sure if this is good, but it's how it works now...
|
|
||||||
'ui-ribbons-placement-modes': {
|
|
||||||
'legacy': 'legacyDOMAdapter',
|
|
||||||
'new': 'DOMAdapter',
|
|
||||||
},
|
|
||||||
'ui-ribbons-placement-mode': 'new',
|
|
||||||
},
|
|
||||||
|
|
||||||
actions: actions.Actions({
|
|
||||||
toggleRibbonsPlacementMode: ['- Interface/',
|
|
||||||
toggler.Toggler(null, function(_, state){
|
|
||||||
if(state == null){
|
|
||||||
return this.config['ui-ribbons-placement-mode']
|
|
||||||
}
|
|
||||||
|
|
||||||
this.config['ui-ribbons-placement-mode'] = state
|
|
||||||
var modes = this.config['ui-ribbons-placement-modes']
|
|
||||||
|
|
||||||
this.ribbons.dom = ribbons[modes[state]]
|
|
||||||
|
|
||||||
// NOTE: this will lose any state/configuration that
|
|
||||||
// was stored in ribbon dom...
|
|
||||||
this.ribbons.clear('full')
|
|
||||||
this.reload(true)
|
|
||||||
},
|
|
||||||
function(){
|
|
||||||
return Object.keys(this.config['ui-ribbons-placement-modes']) } )],
|
|
||||||
}),
|
|
||||||
|
|
||||||
handlers: [
|
|
||||||
['setup',
|
|
||||||
function(){
|
|
||||||
this.toggleRibbonsPlacementMode(this.config['ui-ribbons-placement-mode'])
|
|
||||||
}],
|
|
||||||
]
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
// Animation...
|
// Animation...
|
||||||
|
|
||||||
@ -1560,7 +1506,6 @@ module.ShiftAnimation = core.ImageGridFeatures.Feature({
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*********************************************************************/
|
/*********************************************************************/
|
||||||
// Mouse...
|
// Mouse...
|
||||||
//
|
//
|
||||||
|
|||||||
@ -79,24 +79,6 @@ var RIBBON = '.ribbon:not(.clone)'
|
|||||||
// XXX think if a way to manage animation timings...
|
// XXX think if a way to manage animation timings...
|
||||||
// XXX not sure if this is the right way to go...
|
// XXX not sure if this is the right way to go...
|
||||||
|
|
||||||
var legacyDOMAdapter =
|
|
||||||
module.legacyDOMAdapter = {
|
|
||||||
getOrigin: getElementOrigin,
|
|
||||||
// XXX this is not used here...
|
|
||||||
setOrigin: setElementOrigin,
|
|
||||||
|
|
||||||
getScale: getElementScale,
|
|
||||||
setScale: setElementScale,
|
|
||||||
|
|
||||||
getOffset: getElementOffset,
|
|
||||||
setOffset: setElementOffset,
|
|
||||||
|
|
||||||
// a bit higher level...
|
|
||||||
shiftOrigin: shiftOriginTo,
|
|
||||||
relativeOffset: getRelativeOffset,
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var DOMAdapter =
|
var DOMAdapter =
|
||||||
module.DOMAdapter = {
|
module.DOMAdapter = {
|
||||||
getOrigin: function(elem){
|
getOrigin: function(elem){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user