On Dec 29, 2014, at 10:19 AM, Tatiana Likhomanenko <tata.antares@yandex.ru> wrote:
Hi, Bryan,
to demonstrate let’s take this example
Jupyter Notebook Viewer
When you look at the source of html page, you’ll find code produced to output the first plot
\(function\(\)\{
var all\_models = \[\{"attributes": \{"plot": \{"type": "Plot", "id": "2b6bb419\-c7d4\-4d1c\-a850\-f455a289a7b7"\}, "location": "min", "bounds": "auto", "doc": null, "id": "783f0d50\-b46f\-4921\-b6ff\-8b7419fd66a5", "dimension": 0\}, ……\.\.
omitted much code
…\.\. \}\];
var modelid = "2b6bb419\-c7d4\-4d1c\-a850\-f455a289a7b7";
var modeltype = "Plot";
var elementid = "7ce001e1\-6af0\-4def\-bfe6\-f408f77a8d1e";
var view;
console\.log\(modelid, modeltype, elementid\);
Bokeh\.load\_models\(all\_models\);
var model = Bokeh\.Collections\(modeltype\)\.get\(modelid\)
window\.model=model;
var view = new model\.default\_view\(
\{model : model\}
\);
window\.view = view;
\_\.delay\(function\(\)\{
('#7ce001e1-6af0-4def-bfe6-f408f77a8d1e').append(view.$el)
}, 1000);
});
Pay attention this is wrapped by \(function\(\)\{\}\), not jQuery, not bokeh\..
Thanks,
Tatiana.
26 дек. 2014 г., в 0:29, Bryan Van de Ven <bryanv@continuum.io> написал(а):
Hi Tatiana,
I have not encountered this behaviour. We only use $ inside AMD modules as a local alias for an explicitly require'd jQuery, AFAIK, and in our main.coffee, we also do:
Bokeh.$ = require("jquery")
# Make sure that we don't clobber any existing definition of \(most
\# likely a previous version of jQuery\.
\_oldJQ = window\.
window.jQuery.noConflict()
if typeof(\) == "undefined"
\# if there was no previous definition of , put our definition into window.\.
window\. = _oldJQ
So I am not sure how we'd be clobbering anything. Where are you suggesting we use jQuery instead of $, exactly? Can you provide an IPython notebook and instructions to minimally reproduce the problem?
Thanks,
Bryan
On Dec 25, 2014, at 1:20 PM, Tatiana Likhomanenko <tata.antares@gmail.com> wrote:
Hi!
There is strange behavior observed when I reload (crtl+R) notebook without restarting kernel.
For some strange reason is overridden \(maybe by some other module\), and it can not run (delegate)
So after I reload notebook all the drawn plots are shown well, but new ones after running cells do not appear.
Replacing $ = jQuery breaks the notebook completely.
The simple fix is instead of
$(function(){ code of drawing here})
use
jQuery(function(){ code of drawing here})
IMHO, this is more relevant, since $ may be not only jQuery object (while jQuery object always has the same meaning).
Thanks in advance!
--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ae9e3131-73a9-43b3-99de-0f354bfb4806%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
--
You received this message because you are subscribed to a topic in the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this topic, visit https://groups.google.com/a/continuum.io/d/topic/bokeh/7CJxL7cKxXs/unsubscribe\.
To unsubscribe from this group and all its topics, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/5D6C1765-FD27-4447-80CF-DFE6C28A4AF1%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/51E2307A-9CC5-4A41-8FC6-A917493FA4C3%40yandex.ru\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.