[hotfix] iframe viz is broken

This commit is contained in:
Maxime Beauchemin 2017-04-06 09:11:35 -07:00
parent 7a08cdcb1c
commit 9c99be510b
3 changed files with 11 additions and 2 deletions

View File

@ -1,4 +1,5 @@
import $ from 'jquery';
import Mustache from 'mustache';
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { Alert, Collapse, Label, Panel } from 'react-bootstrap';
@ -104,6 +105,14 @@ class ChartContainer extends React.PureComponent {
height: getHeight,
render_template: function (s) {
const context = {
width: this.width,
height: this.height,
};
return Mustache.render(s, context);
},
setFilter: () => {},
getFilters: () => (

View File

@ -655,7 +655,7 @@ export const controls = {
label: 'URL',
description: 'The URL, this control is templated, so you can integrate ' +
'{{ width }} and/or {{ height }} in your URL string.',
default: 'https: //www.youtube.com/embed/JkI5rg_VcQ4',
default: 'https://www.youtube.com/embed/AdSZJzb-aX8',
},
x_axis_label: {

View File

@ -1,8 +1,8 @@
import $ from 'jquery';
const Mustache = require('mustache');
const utils = require('./utils');
// vis sources
/* eslint camel-case: 0 */
import Mustache from 'mustache';
import vizMap from '../../visualizations/main.js';
import { getExploreUrl } from '../explorev2/exploreUtils';
import { applyDefaultFormData } from '../explorev2/stores/store';