fixed a problem with shadows, now they are the same size as a ribbon by deffinition as they are ribbons ;)

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-11-10 04:11:06 +03:00
parent ed0b08963b
commit 5fe2c662f7
4 changed files with 18 additions and 12 deletions

View File

@ -424,12 +424,14 @@ stretching in width... */
} }
*/ */
/* NOTE: this is essentially a ribbon... */
.shadow { .shadow {
position: absolute; position: absolute;
overflow: visible; overflow: visible;
width: auto; width: auto;
height: auto; height: auto;
margin: 0px;
background: black; background: black;

View File

@ -30,6 +30,7 @@
*/ */
.shadow { .shadow {
margin: 0px;
z-index: 4000; z-index: 4000;
} }
.ui-bounds-indicators { .ui-bounds-indicators {

View File

@ -375,6 +375,7 @@ module.RibbonsPrototype = {
// Example: several fast consecutive horizontal shifts will result // Example: several fast consecutive horizontal shifts will result
// in a single shadow "flowing" through the ribbon. // in a single shadow "flowing" through the ribbon.
// NOTE: multiple shadows of different images are supported... // NOTE: multiple shadows of different images are supported...
// NOTE: the .shadow element is essentially a ribbon.
// //
// XXX should we also have a ribbon shadow??? // XXX should we also have a ribbon shadow???
makeShadow: function(target, animate, delay){ makeShadow: function(target, animate, delay){
@ -411,7 +412,7 @@ module.RibbonsPrototype = {
// ...we need to scale it to the current scale... // ...we need to scale it to the current scale...
var shadow = setElementScale( var shadow = setElementScale(
$('<div>') $('<div>')
.addClass('shadow') .addClass('shadow ribbon')
.attr({ .attr({
gid: gid, gid: gid,
ticket: ticket, ticket: ticket,
@ -422,10 +423,13 @@ module.RibbonsPrototype = {
.clone() .clone()
.removeClass('current') .removeClass('current')
.attr('gid', null)) .attr('gid', null))
/*
.css({ .css({
width: img.width(), width: img.outerWidth(),
height: img.height(), height: img.outerHeight(),
}), s) })
*/
, s)
// place it over the current image... // place it over the current image...
.css({ .css({
top: io.top - vo.top, top: io.top - vo.top,

View File

@ -1092,15 +1092,15 @@ actions.Actions({
// | | image | | - block close to viewer proportion // | | image | | - block close to viewer proportion
// | | <--> | | - image block growing parallel to viewer // | | <--> | | - image block growing parallel to viewer
// | | | | longer side // | | | | longer side
// | +-----------+ | // | +-----------+ | - this stage is not affected specific by image
// +---------------+ // +---------------+ proportions and can be done in bulk
// //
// //
// C) // C)
// viewer // viewer
// +---------------+ // +---------------+
// | image | - image block same size as viewer // | image | - image block same size as viewer
// | | // | | - need to account for chrome
// | | // | |
// | | // | |
// | | // | |
@ -1113,10 +1113,10 @@ actions.Actions({
// . . // . .
// +---------------+ // +---------------+
// | viewer | - image bigger than viewer in one dimension // | viewer | - image bigger than viewer in one dimension
// | ^ | - block grows along viewer short side, now // | ^ | - block grows to fit image proportions
// | | | closer to image proportions // | | | - need to account for individual image
// | v | - drag enabled // | v | proportions
// | | // | | - drag enabled
// +---------------+ // +---------------+
// . . // . .
// + - - - - - - - + // + - - - - - - - +
@ -1142,7 +1142,6 @@ module.SingleImageView = Feature({
tag: 'ui-single-image-view', tag: 'ui-single-image-view',
// XXX should this be an action??? // XXX should this be an action???
// XXX
updateImageProportions: function(actions){ updateImageProportions: function(actions){
// XXX // XXX
}, },