angular-particle icon indicating copy to clipboard operation
angular-particle copied to clipboard

Default params always applied

Open ninesalt opened this issue 7 years ago • 5 comments

I'm trying to overwrite the default params object but nothing I try seems to be working. Even when I change the code sample you have in your example, nothing changes.

        this.myParams = {

                    particles: {
                        number: {
                            value: 2,    //changed to 2 instead of 200
                        },

                        color: {
                            value: '#fff000'  //changed color
                        },
                        shape: {
                            type: 'triangle',
                        },
        	    }
        	};

ninesalt avatar Aug 05 '17 13:08 ninesalt

@Swailem95 try this <particles [params]="myParams" [style]="myStyle" [width]="width" [height]="height"></particles>

sagarkaurav avatar Sep 08 '17 05:09 sagarkaurav

I was able to change it to only particles param, if I try to change the interactivity params doesn't works.

this.particleParams = {
      'particles': {
        'number': {
          'value': 100,
        },
        'color': {
          'value': '#FFF'
        },
        'shape': {
          'type': 'circle',
        },
      },
      'interactivity': {
        'onhover': {
          'enable': true,
          'mode': 'bubble'
        }
      }
    };

asfo avatar Dec 20 '17 18:12 asfo

in order to fix this you need to overwrite the position css . try something like this : /deep/.particles-container { position: inherit!important; }

dawn88set avatar Jan 12 '18 18:01 dawn88set

@dawn88set , sorry still the same :-(

cloudyape avatar Sep 02 '18 16:09 cloudyape

You need to wrap onhover in events. e.g.

interactivity: {
        events: {
          onhover: {
            enable: false
          }
        }
     }

noahch avatar Mar 28 '19 12:03 noahch