mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-01 03:40:09 +00:00
started work on panel auto-hide -- still not done...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
cbe7d3f4b8
commit
a38727b6eb
@ -77,6 +77,7 @@
|
||||
min-width: 10px;
|
||||
|
||||
background: white;
|
||||
opacity: 0.95;
|
||||
|
||||
box-shadow: 5px 5px 30px -5px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
@ -89,6 +90,15 @@
|
||||
border-left: solid 1px silver;
|
||||
}
|
||||
|
||||
.side-panel.auto-hide {
|
||||
width: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.side-panel.auto-hide:hover {
|
||||
width: auto;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
|
||||
/* main controls */
|
||||
.sub-panel .control {
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
function _setupPanel(panel){
|
||||
return panel
|
||||
.on('panelClosing', function(){
|
||||
if($('.panel').length <= 1){
|
||||
if($('.sub-panel').length <= 1){
|
||||
// XXX when not only the editor is using the panels, this
|
||||
// is not the correct way to go...
|
||||
toggleEditor('off')
|
||||
@ -40,12 +40,14 @@ var toggleEditor = createCSSClassToggler(
|
||||
function(action){
|
||||
// XXX when not only the editor is using the panels, this
|
||||
// is not the correct way to go...
|
||||
var ed = $('.panel')
|
||||
var ed = $('.panel, .side-panel')
|
||||
|
||||
if(action == 'on'){
|
||||
// create the editor if this is first init...
|
||||
if(ed.length == 0){
|
||||
$('.viewer')
|
||||
.append(makeSidePanel('left'))
|
||||
.append(makeSidePanel('right'))
|
||||
.append(_setupPanel(makeEditorControls('.current.image'))
|
||||
//.draggable('option', 'snap', '.viewer')
|
||||
.css({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user