Giter Site home page Giter Site logo

Comments (13)

simonsarris avatar simonsarris commented on May 1, 2024 1

Closed issues in Github is not really the place to ask for support help. Use the forum instead.

from gojs.

simonsarris avatar simonsarris commented on May 1, 2024

You will need to call myDiagram.requestUpdate() when the DIV that contains the diagram is fully in view. See:

http://gojs.net/latest/intro/resizing.html

http://gojs.net/latest/samples/tabs.html

from gojs.

vapits avatar vapits commented on May 1, 2024

Well you;re right. I manage to do that (i am using angular) by broadcasting a scope so i can now when to run it. Still though it does not render (the function runs without error).

I'm doing it like this:

$scope.renderDiagram = function(){
$scope.$broadcast('showDiagram');
};

and in my directive:

scope.$on('showDiagram', function () {
diagram.requestUpdate();
});

from gojs.

vapits avatar vapits commented on May 1, 2024

And my code is almost exactly like this sample:
http://www.gojs.net/latest/samples/angular.html

from gojs.

nadvez avatar nadvez commented on May 1, 2024

Hi, I am stuck up with the similar situation.I am using angular with GOJS and tabs. My diagram is in tab3 and i have to click on inspect for it to show up.

Did you guys had it work and what was the solution ?

from gojs.

simonsarris avatar simonsarris commented on May 1, 2024

@nadvez Did you see how this was implemented?

http://gojs.net/latest/samples/tabs.html

from gojs.

nadvez avatar nadvez commented on May 1, 2024

@simonsarris. Thanks but i dont think this will help me. As i am using angular uib tabset where each tab set has redirection to pages like this and each one of them has their own scope.

see below:

    <uib-tabset style="margin-top:-20px;">
        <uib-tab heading="Validate NED" id="devicetabs" class="navhead" select="tabSelected($index)">

            <uib-tab-heading>Step 1 : Validate NED
            </uib-tab-heading>
            <div ng-include="'app/config_gen/templates/validateNed.html'"></div>
        </uib-tab>
        <uib-tab heading="Service Parameters" class="navhead" id="devicetabs">
            <uib-tab-heading> Step 2 : Service Parameters
            </uib-tab-heading>
            <div ng-include="'app/config_gen/templates/serParam.html'"></div>
        </uib-tab>
        <uib-tab heading="Mapping" class="navhead" id="tab3">
            <uib-tab-heading> Step 3 : Mapping
            </uib-tab-heading>
            <div ng-include="'app/config_gen/templates/mapping.html'"></div>
        </uib-tab>
        <uib-tab heading="Make Package" class="navhead" id="tab4">
            <uib-tab-heading> Step 4 : Make and Deploy Package
            </uib-tab-heading>
            <div ng-include="'app/config_gen/templates/makePackage.html'"></div>
        </uib-tab>

    </uib-tabset>
</div>

I was just wondering how vapits acheived it in angular ?

from gojs.

nadvez avatar nadvez commented on May 1, 2024

Hi Vapits,

How did you implement the diagram for the tab other than the first one. Is there a way to check your code. is it on the github for me to compare ?

from gojs.

vapits avatar vapits commented on May 1, 2024

@nadvez Sorry mate it's so long before I don't remember exactly and it's a private repo. Tho...
If you work with Angular-Ui (boothstrap) it should work. Otherwise add a listener on your tabs (you've got one by angular-ui) and on the change do the diagram.requestUpdate() mentioned above.

Take care.

from gojs.

nadvez avatar nadvez commented on May 1, 2024

@vapits Thanks. DO you remember how did you invoke the scope of the diagram.requestUpdate() from the directive ?

it will return undefined as diagram is defined as part of directive which is inside the controller of the html included in the UI tabset?

from gojs.

nadvez avatar nadvez commented on May 1, 2024

@simonsarris. also tried the tab implementation using the minimal go js implementation even then same problem. Do you know when to invoke the diagram.requestUpdate() ?

as it was returning undefined if i have it as Immediately executable function on tab load ?

from gojs.

vapits avatar vapits commented on May 1, 2024

Change the diagram with your diagram's name.

from gojs.

nadvez avatar nadvez commented on May 1, 2024

Ya ... The problem is i am usinh uib tabset to include the html which
diagram as part of its controller .
. now how can i call that function on load on this tab ?

Did you use scope.brodcast?
On May 11, 2016 8:45 AM, "Vassilis Pitsounis" [email protected]
wrote:

Change the diagram with your diagram's name.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#10 (comment)

from gojs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.