RTL support for portfolio-item

5 replies · opened Nov 3, 2017

MmjfermanNov 3, 2017

Hi,
i using with great template "The Multi-Purpose HTML5 Template" .
my question is: how can i to change the direction of portfolio-item to right instead of left ?

MmjfermanNov 4, 2017

any help?

SSemicolon WebSTAFFNov 4, 2017

Hello,

Please follow the RTL Setup guide provided in the Documentation > Start > RTL Setup Section.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

MmjfermanNov 5, 2017

i'm waiting for your help, it's very important for me .

SSemicolon WebSTAFFNov 5, 2017

Hello,

Thanks for your Patience!

We figured out that the issue was because of the Isotope Plugin. To make this work for RTL, simply add the isOriginLeft: false, Option in the Isotope JS Settings. Simply update the gridInit: function( $container ) Function Block in the js/functions.js File with the following code:

gridInit: function( $container ){

	if( !$().isotope ) {
		console.log('gridInit: Isotope not Defined.');
		return true;
	}

	if( $container.length < 1 ) { return true; }
	if( $container.hasClass('customjs') ) { return true; }

	$container.each( function(){
		var element = $(this),
			elementTransition = element.attr('data-transition'),
			elementLayoutMode = element.attr('data-layout'),
			elementStagger = element.attr('data-stagger'),
			elementOriginLeft = true;

		if( !elementTransition ) { elementTransition = '0.65s'; }
		if( !elementLayoutMode ) { elementLayoutMode = 'masonry'; }
		if( !elementStagger ) { elementStagger = 0; }
		if( $body.hasClass('rtl') ) { elementOriginLeft = false; }

		setTimeout( function(){
			if( element.hasClass('portfolio') ){
				element.isotope({
					layoutMode: elementLayoutMode,
					isOriginLeft: elementOriginLeft,
					transitionDuration: elementTransition,
					stagger: Number( elementStagger ),
					masonry: {
						columnWidth: element.find('.portfolio-item:not(.wide)')[0]
					}
				});
			} else {
				element.isotope({
					layoutMode: elementLayoutMode,
					isOriginLeft: elementOriginLeft,
					transitionDuration: elementTransition
				});
			}
		}, 300);
	});
},

This will definitely fix your issue. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard