s-yadav / angulargrid

Pinterest like responsive masonry grid system for angular
MIT License
277 stars 105 forks source link

Link on whole grid element strange behavior #104

Closed jahu closed 7 years ago

jahu commented 7 years ago

I am trying to make my grid 'clickable', after clicking on whole tile of the grid I want to navigate to details of given tile:

<ul class="dynamic-grid" angular-grid="pics" ag-grid-width="200" performantScroll=true ag-id="gallery" ag-refresh-on-img-load="true" pageSize="1">
     <li data-ng-repeat="pic in pics" class="grid" ng-show="pic.product[6] === '0'">
    <a data-ng-href="#/product/{{pic.product[0]}}">
       <img src="{{pic.photos[0][3]}}" class="grid-img" data-actual-width = "{{pic.actualWidth}}"  data-actual-height="{{pic.actualHeight}}" />

         <h4 class="card-title text-center">{{pic.product[2]}}</h4>
         <h6 ng-hide="pic.product[5] > 0" class="card-title text-center">{{pic.product[4] | number: 0}} PLN </h6>
         <h6 ng-show="pic.product[5] > 0" class="card-title text-center lineThrough">{{pic.product[4] | number: 0}} PLN </h6>
         <h6 ng-show="pic.product[5] > 0" class="card-title text-center">{{pic.product[5] | number: 0}} PLN </h6>
       </a>
     </li>
 </ul>

Unfortunatelly, href values are messed up on images when grid is rendered (whereas on text attributes (h4, h6 etc) it works correct.

When hover on img link is wrong (to ....17): image

Whene hover on text link is OK: image

Issue is random, but it is reproducible in 90% of cases.

Any hint appreciated.

s-yadav commented 7 years ago

I dont think this is related to angular grid. Why there is ** before and after closing of anchor tag?

On Feb 4, 2017 12:28 AM, "Jacek Gralak" notifications@github.com wrote:

I am trying to make my grid 'clickable', after clicking on whole tile of the grid I want to navigate to details of given tile:

Unfortunatelly, href values are messed up on images when grid is rendered (whereas on text attributes (h4, h6 etc) it works correct.

When hover on img link is wrong (to ....17): [image: image] https://cloud.githubusercontent.com/assets/7642643/22604241/e5931aea-ea4a-11e6-82a2-162962d5bfed.png

Whene hover on text link is OK: [image: image] https://cloud.githubusercontent.com/assets/7642643/22604259/ffba369c-ea4a-11e6-9667-2802fea9373d.png

Issue is random, but it is reproducible in 90% of cases.

Any hint appreciated.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/s-yadav/angulargrid/issues/104, or mute the thread https://github.com/notifications/unsubscribe-auth/AC9Avl0k_HhomXxqfn0ZS5Rfg1vORs8cks5rY3i_gaJpZM4L2rsz .

s-yadav commented 7 years ago

Ohh that was just on mail. Do you any link for it. Or can setup a codepen for it?

jahu commented 7 years ago

http://lazycangoo.pl/#/shop

s-yadav commented 7 years ago

Issue is not related to angulargrid. It must be some logic issue on the code. Closing it.