MooTools > MooFlow > Resizing Window >> any idea <<

Discussion in 'JavaScript' started by GAdsense, Jan 13, 2009.

  1. #1
    GAdsense, Jan 13, 2009 IP
  2. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #2
    w/o dwelling too much on it - it seems that it uses a semantic approach:
    	<div id="MooFlow">
    		<a href="http://www.apple.de" rel="link"><img src="img/applelogo.jpg" title="Apple Deutschland" alt="Visit www.apple.de" /></a>
    		<a href="http://www.apple.com" rel="link"><img src="img/shinny-logo.jpg" title="Apple US" alt="Visit www.apple.com" /></a>
    		<a href="img/big/macbook_pro2.jpg" rel="image"><img src="img/macbook_pro2.jpg" title="MacBook Pro" alt="Pure Schönheit. Pure Leistung." /></a>
    		<a href="img/big/macpro.jpg" rel="image"><img src="img/macpro.jpg" title="Mac Pro" alt="Der neue 8-Core Standard." /></a>
    		<a href="img/big/macbook_air.jpg" rel="image"><img src="img/macbook_air.jpg" title="MacBook Air" alt="Das dünnste Notebook der Welt." /></a>
    	</div>
    
    HTML:
    this is your setup therefore it must auto-adjust to work within the assigned container.
    	var myMooFlowPage = {
    	
    		start: function(){
    			/* MooFlow instance with the complete UI and Viewer */
    			var mf = new MooFlow($('MooFlow'), {
    				useSlider: true,
    				useAutoPlay: true,
    				useCaption: true,
    				useResize: true,
    				useMouseWheel: true,
    				useKeyInput: true,
    				useViewer: true
    			});
    			
    			mf.attachViewer();
    			
    			$$('.loadremote').addEvent('click', function(){
    				mf.loadHTML(this.get('href'), this.get('rel'));
    				return false;
    			});
    			
    		}
    		
    	};
    	
    	window.addEvent('domready', myMooFlowPage.start);
    
    PHP:
    so basically - it runs within the layer defined above which seems to take its width from #content to 700px.

    you should try at first to define width and height for either the $('MooFlow') (#MooFlow div) or the #container or your own equivalent. failing that... then yes, you'd actually have to look at the guy's code and see how you get on. from what i remember last time that i did that, it was really well written and well organised into classes and methods, so you ought to be able to find your way around pretty easily. ping me if you need help - i may have some spare time :D
     
    dimitar christoff, Jan 14, 2009 IP
  3. GAdsense

    GAdsense Well-Known Member

    Messages:
    1,247
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    140
    #3
    I've changed the width of container from css earlier, helped me to nicely reduce the width and from MooFlow.js, I changed the hieghtRatio, which controls the hieght. But the problem remained is the inside of the box content is at the same place, that is not reducing its size. So after a bit of change, of a number after "bottom" in the MooFlow.js, this lead the players control to get down a bit. Looking better now but still it seems tight so I may contact you soon..... but thanks a ton for coming forward to ask for help...
     
    GAdsense, Jan 14, 2009 IP
  4. GAdsense

    GAdsense Well-Known Member

    Messages:
    1,247
    Likes Received:
    60
    Best Answers:
    0
    Trophy Points:
    140
    #4
    Hi Dimitar... I now need your help, complete site is ready and coded. Everything works fine, but this gallery is creating so much issues. Please let me know if there is any one who can resize this gallery in my website box and still work perfectly.

    Please let me know, thanks!
     
    GAdsense, Jan 15, 2009 IP
  5. J.Winnfield

    J.Winnfield Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I'm having similar problems, images are resized bigger that the real size, for exsample image that has height 250 pixels is more like 350 height in the carousel. How could I change the code so it wouldn't resize image's up, only down(as they go around).
    There's a alternative function to set up in the code variables (useResize: false,) but it's not working.
    You can find the code from here: http://www.outcut.de/MooFlow/example-ajax.html
    Thanks in advance.
     
    J.Winnfield, Feb 4, 2010 IP
  6. J.Winnfield

    J.Winnfield Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Oh, stupid me after having little fight with the code I managed to do this, by setting the variable "zoom" to 100, of god it was hard...
     
    J.Winnfield, Feb 5, 2010 IP
  7. J.Winnfield

    J.Winnfield Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You should be able to this via heightRatio.
     
    J.Winnfield, Feb 5, 2010 IP
  8. solo_dav

    solo_dav Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    search for this code in MooFlow.js

    div.setStyle('top', round(oW * 0.4 - H) + 'px');

    and change the variant 0.4 to 0.3 you are done:cool:
     
    solo_dav, Aug 3, 2010 IP