Giter Site home page Giter Site logo

treeviz issue with Edge about treeviz HOT 8 CLOSED

pierrecapo avatar pierrecapo commented on June 19, 2024
treeviz issue with Edge

from treeviz.

Comments (8)

PierreCapo avatar PierreCapo commented on June 19, 2024

@ypeskin could you provide me the code you used for the nodeTemplate field please ? Also does it happen on Firefox or Chrome ?

from treeviz.

ypeskin avatar ypeskin commented on June 19, 2024

Here's the entire html file:
@model IEnumerable<EF6SytelineData.Model.SIBillOfMaterialsWithMfgLeadTimesModel>

@{
ViewBag.Title = "BillOfMaterialsDisplay";
}

Item

loading
<script src="~/Scripts/treeviz/1.2.0/index.js"></script> <script> // auto,0,auto,0 $(function () { $(window).load(function () { $("#divTree").width($(window).width()); }); $(window).resize(function () { $("#divTree").width($(window).width()); }); });

const treeConfig = {
htmlID: "divTree",
nodeField: "MatlItem",
flatData: false,
relationnalField: "Children",
zoomBehavior: true,
nodeSpacerPercentage: 1.20,
nodeWidth: 125,
nodeHeight: 80,
nodeColor: (nodeData) =>"#ffffff",
horizontalLayout: false,
linkColor: (nodeData) => "#000000",
linkShape: "orthogonal",
linkWidth: (nodeDatat) => 3,
depthDistance: 5,
// nodeDepthDistance: "auto",
nodeTemplate: (nodeData) => "

" + nodeData.MatlItem + "
Lead Time: " + nodeData.LeadTime + "
"
}

let myTree = Treeviz.create(treeConfig); // create a tree based on the config

function getBom() {
var item = $("#txtItem").val();
$("divLoading").show();
if (item) {
$.ajax({
cache: false,
type: 'Get',
url: '@Url.Action("GetBom")',
data: { itm: item },
success: function (data) {
$("#divLoading").hide();
if (data.Success == "OK") {
myTree.clean(); // delete the old tree
myTree = Treeviz.create(treeConfig); // configure a new tree with the previous same configuration
myTree.refresh(data); // refresh new tree
}
else {
alert(data.Message);
}
}
});
}
}
</script>

This only occurs in IE.

from treeviz.

PierreCapo avatar PierreCapo commented on June 19, 2024

it occurs with Edge, not IE right ?

from treeviz.

ypeskin avatar ypeskin commented on June 19, 2024

from treeviz.

ypeskin avatar ypeskin commented on June 19, 2024

Pierre,
I was testing your code and I don't think you merged clean-method branch into the master yet. Because, I keep getting an error: TypeError: myTree.clean is not a function
at Object.success (BillOfMaterialsDisplay:123)
at i (jquery-1.12.4.min.js:2)

from treeviz.

PierreCapo avatar PierreCapo commented on June 19, 2024

Yeah you are right, I forget to merge it. It should work now

from treeviz.

ypeskin avatar ypeskin commented on June 19, 2024

Great, thanks. I'll try it again tomorrow.

from treeviz.

PierreCapo avatar PierreCapo commented on June 19, 2024

Closing since Edge is going to move soon to Chromium

from treeviz.

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.