4 Replies Latest reply: Apr 4, 2016 11:44 AM by Frank Cecconi RSS

    Show/Hide an object & disable right-click menu

    Thorsten Schröder

      Hello community,


      I have a self-created extension object and now I'm stuck with the following two tasks:


      1) disable the right-click context-menu when clicking on the object (because the extension uses the right-click to move an object inside the window).

      2) only show the object when two inputboxes have a predefined selection.

      Example: Inputbox Product must have the text "ProductA" and Inputbox Type must have the text "Store" in order for the object to appear on screen.


      This is part of my script.js file:

      function ThreeJS_Init() {  
        var js_Load = function () {      
      //Loads other JS files aside from jQuery. Called after ensuring jQuery is loaded       
      Qva.LoadScript(template_path + 'lib/js/three.min.js', function () {
                  Qva.LoadScript(template_path + 'lib/js/TrackballControls.js', function () {
          Qva.LoadScript(template_path + 'lib/js/tween.min.js', function (){
        Qva.LoadScript('https://getfirebug.com/firebug-lite.js#startOpened=true', ThreeJS_Done);                            
      if (typeof jQuery == 'undefined') Qva.LoadScript(template_path + '/lib/js/jquery-1.9.1.min.js', js_Load);     else js_Load(); }
      function ThreeJS_Done() {    
      //Fires when the init function is complete, loads stylesheets and creates a div //Add extension    
      Qva.AddExtension("ThreeJS", function () { //Load a CSS style sheets       
      Qva.LoadCSS(template_path + "lib/css/style.css");


      Later I add the element to the div container: container.appendChild(renderer.domElement);



      I hope you can show me how this can be done.


      Thank you very much.