Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug when using float:left; in style #200

Open
xh20s opened this issue Apr 12, 2018 · 6 comments
Open

bug when using float:left; in style #200

xh20s opened this issue Apr 12, 2018 · 6 comments

Comments

@xh20s
Copy link

xh20s commented Apr 12, 2018

hi,
i am trying to display result 2 in each row that would be ( width:50% and float:left )

here is an example of my issue in jsfiddle you will notice only half div is showing rest is blank.

anyone can help me with this issue?

regards,

@xh20s
Copy link
Author

xh20s commented Apr 15, 2018

anyone?
i am prepare to donate $20 for any help regarding this issue.

i really would like to use this project instead of others.

regards,

@kamilkp
Copy link
Owner

kamilkp commented Apr 15, 2018

Ok, I’ll take a look at it tonight and get back to you.

@xh20s
Copy link
Author

xh20s commented Apr 15, 2018

thank you Mr Kamilkp

@kamilkp
Copy link
Owner

kamilkp commented Apr 15, 2018

In order to use vs-repeat the items need to be stacked either horizontally or vertically. This kind of layout is not supported. I presume you don't want to alter your HTML structure so the solution is to use ng-repeat-start/ng-repeat-end pattern. You'd need to calculate an array of arrays of 2 numbers (number of coulmns which is in this case 2) and render each row with using ng-repeat-start/end. Here's how to do it in your fiddle: https://jsfiddle.net/zLq1bot6/2/

@kamilkp
Copy link
Owner

kamilkp commented Apr 15, 2018

I.E.:

vm.pairs = vm.items.reduce((acc, item) => {
    if (!acc.length)
    	return [[item]];
    var last = acc[acc.length - 1];
    if (last.length < 2)
    	last.push(item);
    else
    	acc.push([item]);
    return acc;
}, []);
  <div ng-repeat-start="pair in ctrl.pairs" class="repeated-item">
    {{pair[0]}}
  </div>
  <div ng-repeat-end class="repeated-item">
    {{pair[1]}}
  </div>

@xh20s
Copy link
Author

xh20s commented Apr 16, 2018

thank you mr kamilkp.

can you look at this issue? jsfiddle

screenshot of issue => http://bodyresultsblueprint.com/issue.png

  • changed js to newer version
  • changed css size

any advice?

regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants