Ticket #16004: 0001-text-hint-to-use-right-click-menu-on-live-3-D-applet.patch

File 0001-text-hint-to-use-right-click-menu-on-live-3-D-applet.patch, 1.2 KB (added by gutow, 7 years ago)

Here is a simple patch the makes puts up a text hing to use the right click menu when the applet is live.

  • sagenb/data/sage/js/jmol_lib.js

    From 35c9eb18994ff6fdd6f691a55bf8ac7a38044f69 Mon Sep 17 00:00:00 2001
    Message-Id: <35c9eb18994ff6fdd6f691a55bf8ac7a38044f69.1413508896.git.gutow@uwosh.edu>
    From: gutow <gutow@uwosh.edu>
    Date: Thu, 16 Oct 2014 20:21:07 -0500
    Subject: [PATCH] text hint to use right-click menu on live 3-D applet
    
    ---
     sagenb/data/sage/js/jmol_lib.js | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/sagenb/data/sage/js/jmol_lib.js b/sagenb/data/sage/js/jmol_lib.js
    index 34c913d..d3ff68c 100644
    a b SageJmolManager.prototype.ready_callback = function (name, applet) { 
    5959    this._lru_names.push(name);
    6060    Jmol.script(applet, "set platformSpeed 6;");
    6161    this.enforce_limit();
     62    jQuery('#'+name).parent().append('<div id="'+name+'_hint">Right-click to get options menu.</div>');
    6263};
    6364
    6465// Get the most recently used applet names
    SageJmolManager.prototype.enforce_limit = function() { 
    8788        var applet = this._applets[name];
    8889        console.log('Covening applet ' + name);
    8990        Jmol.coverApplet(applet, true);
     91        jQuery('#'+name+'_hint').remove();
    9092    }
    9193};
    9294