Questions tagged [render]

Rendering is the process of generating an image from a model (or models in what collectively could be called a scene file), by means of computer programs.

A scene file contains objects in a strictly defined language or data structure; it would contain geometry, viewpoint, texture, lighting, and shading information as a description of the virtual scene

5211 questions
577
votes
16 answers

Parse Error: Adjacent JSX elements must be wrapped in an enclosing tag

I am trying to set up my React.js app so that it only renders if a variable I have set is true. The way my render function is set up looks like: render: function() { var text = this.state.submitted ? 'Thank you! Expect a follow up at…
user1072337
  • 12,615
  • 37
  • 116
  • 195
344
votes
39 answers

Scroll to the top of the page after render in react.js

I have a problem, which I have no ideas, how to solve. In my react component I display a long list of data and few links at the bottom. After clicking on any of this links I fill in the list with new collection of the links and need to scroll to the…
Andrew Kovalenko
  • 6,441
  • 2
  • 29
  • 43
310
votes
21 answers

Render HTML to an image

Is there a way to render html to image like PNG? I know that it is possible with canvas but I would like to render standard html element like div for example.
Martin Delille
  • 11,360
  • 15
  • 65
  • 132
138
votes
5 answers

Rails render partial with block

I'm trying to re-use an html component that i've written that provides panel styling. Something like:

Some Title

.. content goes here …
brad
  • 31,987
  • 28
  • 102
  • 155
127
votes
11 answers

How do I render a partial of a different format in Rails?

I'm trying to generate a JSON response that includes some HTML. Thus, I have /app/views/foo/bar.json.erb: { someKey: 'some value', someHTML: "<%= h render(:partial => '/foo/baz') -%>" } I want it to render /app/views/foo/_baz.html.erb, but it…
James A. Rosen
  • 64,193
  • 61
  • 179
  • 261
107
votes
8 answers

visibility:hidden vs display:none vs opacity:0

I'm currently starting on an animation project. In the project I'll have more than 40000 divs and animate them iteratively. If any of divs are in passive state (i.e. it's not animating at least for 2 seconds), I won't display them to increase…
Cihad Turhan
  • 2,749
  • 6
  • 28
  • 45
92
votes
3 answers

How to Call a Function inside a Render in React/Jsx

I want to call a function inside some embedded html. I tried the following but the function isn't called. Would this be the incorrect way of calling a function inside a render method? import React, { Component, PropTypes } from 'react'; export…
lost9123193
  • 10,460
  • 26
  • 73
  • 113
86
votes
26 answers

Django - Reverse for '' not found. '' is not a valid view function or pattern name

I'm working on my project for a course and I'm totally stuck right now. I'm creating a website to sell products through paypal and the paypal return/cancel pages are not rendering properly. I've followed the examples in my lessons and checked the…
Ire
  • 979
  • 1
  • 8
  • 13
68
votes
4 answers

Ruby on Rails - Render JSON for multiple models

I am trying to render results from more than one model in JSON. The following code in my controller only renders the first result set: def calculate_quote @moulding = Moulding.find(params[:id]) @material_costs = MaterialCost.all …
freshest
  • 6,229
  • 9
  • 35
  • 38
46
votes
6 answers

Integrate MuPDF Reader in an app

I am working on some stuff that should be able to read PDF in my app and I want to put PDF view in my custom layout. I had preferred Android PDF Viewer but when I performed zoomIn, zoomOut it takes too much time. So currently I am supposed to use…
dharmendra
  • 7,835
  • 5
  • 38
  • 71
46
votes
11 answers

WPF DataGrid is very slow to render

I have tried using both a customized DataGrid as well as the stock one in WPF. I have tried populating them manually as well as through bindings. In both cases they are slow. I have a scenerio where the user clicks on a button and a DataGrid…
David Gunther
  • 461
  • 1
  • 5
  • 5
45
votes
3 answers

rendering and saving images through Blender python

I am trying to render and save multiple images through python script in blender. I know how to render and save the image through the Blender GUI but I want to do it all through my script since I am using a set of nested loops and need to save…
user2047506
  • 461
  • 1
  • 4
  • 4
44
votes
4 answers

Rails: Render a View (not a partial) From Within a View

I have a controller that responds to both html and js. The html view renders the whole page (including the header and footer), while the js only replaces #main. Aside from the header and footer, both formats render the same content. I can get this…
nullnullnull
  • 8,039
  • 12
  • 55
  • 107
43
votes
4 answers

One controller rendering using another controller's views

I have QuestionController I now have AnotherQuestionController with actions which should render using templates and partials in app/views/question/ Is this possible? Seems like it should be. I've tried render :template => "question/answer" but…
Paul
  • 1,021
  • 2
  • 12
  • 18
41
votes
5 answers

How to pass variables to render_to_string?

Trying to do the following @message = render_to_string ( :sender => sender, :template => "template" ) But when accessing @sender in template it turns out to be nil:NilClass. Double checked if I pass the right variable and it's totally…
Arty
  • 5,923
  • 9
  • 39
  • 44
1
2 3
99 100