essetwide / material-walkthrough

A material tour (eg Inbox from Google).
https://essetwide.github.io/material-walkthrough/
Apache License 2.0
32 stars 10 forks source link

Want to know some console.log() value of given code inside MaterialWalkthrough.js #50

Closed karanshrm44 closed 6 years ago

karanshrm44 commented 6 years ago

    const hasNext = !!MaterialWalkthrough._instance.points && !!MaterialWalkthrough._instance.points[MaterialWalkthrough._instance.currentIndex + 1];
      if (hasNext) {
        MaterialWalkthrough._instance.currentIndex++;
        console.log( MaterialWalkthrough._setWalker(
          MaterialWalkthrough._instance.points[MaterialWalkthrough._instance.currentIndex]
        ));
      } else {
        MaterialWalkthrough._instance.currentIndex = 0;
        MaterialWalkthrough._instance.points = null;
        if (MaterialWalkthrough._instance.onCloseCallback) MaterialWalkthrough._instance.onCloseCallback();
        MaterialWalkthrough._instance.onCloseCallback = null;
        MaterialWalkthrough.closeWalker();
      }
  }```
oliveirafilipe commented 6 years ago

We will do some refacats in the log process in the v2 branch. What do you want to console in this section? There are some callbacks in the plug-in , we will refact the docs to for the v2 release

karanshrm44 commented 6 years ago

I just want to see what is the value of this particular method ?? How it is working?

oliveirafilipe commented 6 years ago

Hi @karanshrm44, first wich version are you using?

So do you want to know the return value of the setWalker method?

The setWalker its a void method, it runs every position in the walkpoints array (passed as parameter), and do all the magic. Basically, it locates the target and render the wrapper

karanshrm44 commented 6 years ago

I am using version v2, pure vanilla, I want to know how can i run your code locally

oliveirafilipe commented 6 years ago

Now i see what you want. The project uses rollup pkg because we are using ES6 with Import sintax inside the /src folder.

In order to run your code in the browser and see some change, you need first to do your changes under the /src folder then run npm run build to transpile the code, that will be generated under /dist folder.

it's worth pointing out that you need to follow the NPM workflow

karanshrm44 commented 6 years ago

How can I contact personally gitter or similar like that ? I have few more question to ask @oliveirafilipe

oliveirafilipe commented 6 years ago

@karanshrm44 https://tlk.io/material-walkthrough