Skip to content

1.1.0

Choose a tag to compare

@pardnchiu pardnchiu released this 02 Aug 12:21

Added

  • Global function _Listener (keeping _SVGListener and _LazyLoadListener)
    _Listener({
        svg: [Boolean],
        lazyload: [Boolean]
    })
  • PD parameter listener to disable default listeners
    const app = new PD({
        listener: {
            svg: false,
            lazyload: false,
        }
    });
  • Element functions _m and _p
    • _m is used to set the element's margin. It can set margins for top, right, bottom, and left individually or in combination.
      dom._m(10);             // Sets margin for all four sides to 10
      dom._m(10, 20);         // Sets margin for top and bottom to 10, and for left and right to 20
      dom._m(10, 20, 30);     // Sets margin for top to 10, left and right to 20, and bottom to 30
      dom._m(10, 20, 30, 40); // Sets margin for top to 10, right to 20, bottom to 30, and left to 40
    • _p is used to set the element's padding. It can set padding for top, right, bottom, and left individually or in combination.
      dom._p(10);             // Sets padding for all four sides to 10
      dom._p(10, 20);         // Sets padding for top and bottom to 10, and for left and right to 20
      dom._p(10, 20, 30);     // Sets padding for top to 10, left and right to 20, and bottom to 30
      dom._p(10, 20, 30, 40); // Sets padding for top to 10, right to 20, bottom to 30, and left to 40