question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

having difficulty with gutter

See original GitHub issue

In my wrapping div:

<div class="grid" gutter="10" v-masonry transition-duration="0.5s" item-selector=".card"> <card class='card'...></card> </div>

I’m getting this warning:

[Vue warn]: Error in directive masonry inserted hook: “SyntaxError: Failed to execute ‘querySelector’ on ‘Element’: ‘10’ is not a valid selector.”

proto._getMeasurement = function( measurement, size ) {
  var option = this.options[ measurement ];
  var elem;
  if ( !option ) {
    // default to 0
    this[ measurement ] = 0;
  } else {
    // use option as an element
    if ( typeof option == 'string' ) {
      elem = this.element.querySelector( option );
    } else if ( option instanceof HTMLElement ) {
      elem = option;
    }
    // use size of element, if element
    this[ measurement ] = elem ? getSize( elem )[ size ] : option;
  }
};

Looking at the masonry code, it seems like it’s interpreting the 10 as a string and it needs to interpret as an integer. I’ve tried all forms of passing in the gutter attribute: gutter=10 :gutter=“10” :gutter=10

No dice.
Any thoughts? I’m using Vue 2.3.4.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shershen08commented, Jul 8, 2017

@ChefQuix here’s the demo i’ve made up with gutter property - https://jsfiddle.net/d4967v9o/20/ You’re right the current version supports gutter property ONLY via stating the DOM node selector, not pasting the Integer number. css:

.gutter-item {
   width:150px;
}

html:

<div v-masonry ...
   <div class="gutter-item"></div>
   <div v-masonry-tile ...
   <div v-masonry-tile ...
   ...
</div>

I’ll update the docs.

1reaction
shershen08commented, Jul 7, 2017

@ChefQuix yes I see the problem. I’ll check details and update you ASAP

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 Common Gutter Problems Every Homeowner Should be ...
1. Gutters not Draining or Clogged Gutters · 2. Sagging Gutters · 3. Leaks and Holes · 4. Damaged Gutters · 5. Improperly...
Read more >
Easy Gutter Fixes You Can DIY
Solve gutter problems like leaking gutters with these easy fixes and learn how to install a gutter apron. Read on to learn more!...
Read more >
Common Gutter Problems: How the Experts Can Fix Them
It's normal for gutter issues to show up at some point since gutter materials age or can get damaged due to a severe...
Read more >
The 5 Most Common Gutter Problems and How To Fix Them
Clutter in The Gutter​​ Most of the problems homeowners experience with their gutters are caused by the accumulation of debris. Over time, dirt,...
Read more >
Gutter Problems That Can Damage Your Home (5 Common ...
Back-Flows — This happens when rainwater falling from the roof edge runs under the roof or behind the gutters, instead of into the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found