NREL / floorspace.js

Other
66 stars 35 forks source link

Temporarily hide untranslated items #290

Closed macumber closed 6 years ago

macumber commented 6 years ago
macumber commented 6 years ago

If you want to do this with an init config option that is fine otherwise just a temporary todo comment to mark the commented out code

bgschiller commented 6 years ago

@macumber I think the best way to do this is by adding a stylesheet to hide those items when you're initializing the app. No extra api function is needed:

const rules = `
  [data-column="multiplier"] {
    display: none;
  }
  .ground-props-drawer {
    display: none;
  }
  .editable-select-list option[value="pitched_roofs"] {
    display: none;
  }
  [data-column="pitched_roof_id"] {
    display: none;
  }`;
const style = document.createElement('style')
style.type = 'text/css';
style.innerHTML = rules;
document.head.appendChild(style);
macumber commented 6 years ago

This is awesome, thanks @bgschiller !

Does it matter if I evaluate this before or after calling init?

bgschiller commented 6 years ago

No problem :)

And it's fine to run this whenever (before or after init).