public function setAnimation($animation)
    {
        if (!in_array($animation, [Animation::BOUNCE, Animation::DROP])) {
            throw new InvalidConfigException('Unknown animation');
        }
        $this->options['animation'] = new JsExpression($animation);
    }
public function setAnimation($animation)
    {
        if (!in_array($animation, [Animation::BOUNCE, Animation::DROP])) {
            throw new InvalidConfigException('Unknown animation');
        }
        $this->options['animation'] = new JsExpression($animation);
    }
public function setAnimation ( $ animation ) { if ( ! in_array ( $ animation , [ Animation :: BOUNCE , Animation :: DROP ] ) ) { throw new InvalidConfigException ( 'Unknown animation' ) ; } $ this -> options [ 'animation' ] = new JsExpression ( $ animation ) ; }
Sets the animation of the marker

@param $animation

@throws \yii\base\InvalidConfigException
Sets the animation of the marker