cleanup...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-05-04 02:27:31 +03:00
parent 7c890a1657
commit c22c34a49a
2 changed files with 0 additions and 73 deletions

View File

@ -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...
@ -1560,7 +1506,6 @@ module.ShiftAnimation = core.ImageGridFeatures.Feature({
/*********************************************************************/
// Mouse...
//

View File

@ -79,24 +79,6 @@ var RIBBON = '.ribbon:not(.clone)'
// XXX think if a way to manage animation timings...
// 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 =
module.DOMAdapter = {
getOrigin: function(elem){