可以移动/拖动BarChart

时间:2018-01-26 14:09:33

标签: codenameone

我注意到可以移动/拖动CodenameOne-App中BarChart的条形图。这在我的情况下没用,因为BarChart包含在Tab-Element中,其中可以通过滑动更改选项卡。通常会移动条形而不是更改选项卡选择。

你知道如何防止酒吧被移动吗? enter image description here

1 个答案:

答案 0 :(得分:0)

使用 <html> <head> </head> <body> <div class="parent"> </div> <script src="https://www.gstatic.com/firebasejs/4.9.0/firebase.js"></script> <script src="https://www.gstatic.com/firebasejs/4.9.0/firebase-firestore.js"></script> <script> // Initialize Firebase var config = { apiKey: ####, authDomain: ####, databaseURL: ####, projectId: ###, storageBucket: ###, messagingSenderId: ### }; firebase.initializeApp(config); </script> <script> var db = firebase.firestore(); db.collection("users").add({ first: "Ada", last: "Lovelace", born: 2000 }) .then(function(docRef) { console.log("Document written with ID: ", docRef.id); }) .catch(function(error) { console.error("Error adding document: ", error); }); var p = document.querySelector(".parent"); db.collection("users").get().then(function(querySnapshot) { querySnapshot.forEach(function(doc) { var d=String(doc.id); console.log(d); p.innerHTML+=`<button onclick="deleti('${d}')">Ok</button>`; }); }); function deleti(v) { v=v.toString(); console.log(v); db.collection("users").doc(v).delete().then(function() { console.log("Document successfully deleted!"); }).catch(function(error) { console.error("Error removing document: ", error); }); } </script> </body> </html> 方法ChartComponentsetZoomEnabled(false)