Re: [Wikitech-l] New tutorial for interactive graphics on Wiki

2015-12-30 Thread Pine W
The tutorial looks nice! I will take a look when I am less distracted by
finance reports. Thank you for working on this.

Pine
On Dec 30, 2015 22:37, "Yuri Astrakhan"  wrote:

> I just finished writing a tutorial on how to build interactive Vega graphs
> for Wikipedia. And yes, we could build video games this way too :)
>
> https://www.mediawiki.org/wiki/Extension:Graph/Interactive_Graph_Tutorial
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] New tutorial for interactive graphics on Wiki

2015-12-30 Thread Yuri Astrakhan
Well, it already supports geo projections, with mouse-draggable map
spinning [1]... We could implement some 3d models if we can hide the
out-of-sight polygons :)

http://vega.github.io/vega-editor/?mode=vega&spec=map-params
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] New tutorial for interactive graphics on Wiki

2015-12-30 Thread Pine W
Excellent. Can I create a full-detail 3D model of the Millennium Falcon? (:

Pine
On Dec 30, 2015 22:37, "Yuri Astrakhan"  wrote:

> I just finished writing a tutorial on how to build interactive Vega graphs
> for Wikipedia. And yes, we could build video games this way too :)
>
> https://www.mediawiki.org/wiki/Extension:Graph/Interactive_Graph_Tutorial
> ___
> Wikitech-l mailing list
> Wikitech-l@lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

[Wikitech-l] New tutorial for interactive graphics on Wiki

2015-12-30 Thread Yuri Astrakhan
I just finished writing a tutorial on how to build interactive Vega graphs
for Wikipedia. And yes, we could build video games this way too :)

https://www.mediawiki.org/wiki/Extension:Graph/Interactive_Graph_Tutorial
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] The right way to inject user-supplied JavaScript?

2015-12-30 Thread Daniel Barrett
Hmm… actually, looking at the ResourceLoader code, the makeInlineScript() 
function does not actually queue the script to execute. It only returns a 
properly wrapped, anonymized function as a string.  I still needed to call 
OutputPage->addScript() to make it execute.

DanB

From: Wikitech-l [mailto:wikitech-l-boun...@lists.wikimedia.org] On Behalf Of 
Daniel Barrett
Sent: Wednesday, December 30, 2015 11:03 AM
To: Wikimedia developers
Subject: Re: [Wikitech-l] The right way to inject user-supplied JavaScript?

Kevin Israel writes:
>Since MediaWiki 1.26, all ResourceLoader modules are loaded
>asynchronously, so inline scripts now need to account for the
>possibility they may be executed before the jquery and mediawiki modules
>have loaded.
>
>If you use ResourceLoader::makeInlineScript() to build the HTML script
>element, your JavaScript code will be automatically wrapped in an
>anonymous function and queued for execution once ResourceLoader has
>started up.

Thank you! I have documented your advice at 
https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_%28users%29#Inline_scripts.

DanB
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Re: [Wikitech-l] The right way to inject user-supplied JavaScript?

2015-12-30 Thread Daniel Barrett
Kevin Israel writes:
>Since MediaWiki 1.26, all ResourceLoader modules are loaded
>asynchronously, so inline scripts now need to account for the
>possibility they may be executed before the jquery and mediawiki modules
>have loaded.
>
>If you use ResourceLoader::makeInlineScript() to build the HTML script
>element, your JavaScript code will be automatically wrapped in an
>anonymous function and queued for execution once ResourceLoader has
>started up.

Thank you!   I have documented your advice at 
https://www.mediawiki.org/wiki/ResourceLoader/Migration_guide_%28users%29#Inline_scripts.

DanB
___
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l