html5,kineticjs,shapeRelated issues-Collection of common programming errors
SorinV
javascript html5 firefox file-upload
I am trying to get a HTML5 upload to work well. So far I have it working properly, with no problems at all. The only issue I am having looks like this (firefox browser only – chrome works well):load the page try yo upload a very large file (over 1GB) upload takes a very long time to start, then progress is all screwed up and it seems to upload the file twiceIf between the steps 1 and 2 I upload a smaller file, the large file starts uploading properly, with good progress indication.To experience
Artur Sapek
javascript html5 api clipboard
I’m frustrated with how far behind other standard web APIs we are with clipboard access.I’m working on a webapp that lets you draw and edit SVG graphics in the browser. The File API lets me load and read an SVG file completely client-side and the SVG API obviously lets me display SVG graphics.But it’s impossible to get anything I draw out of the browser and paste it into, say, Photoshop, like you can when you copy something in Illustrator.The W3C denies the ability to manipulate copy events on t
Ruby is Chai
html html5 google-chrome firefox contenteditable
I’ve been working with contenteditable recently within a HTML5 page and encountering bugs when using it with certain elements, and I’d like to know where and how I can actually safely use it.I’ve discovered that making a span element contenteditable results in some buggy behaviour in both Firefox1 and Chrome2. However, making a div or section contenteditable appears completely safe3.A guideline a couple of people have mentioned is that only block-level elements should be made contenteditable. Ho
Ernest
html5 canvas font-face
When I draw a text in a canvas with a typeface that is loaded via @font-face, the text doesn’t show correctly. It doesn’t show at all (in Chrome 13 and Firefox 5), or the typeface is wrong (Opera 11). This type of unexpected behavior occurs only at the first drawing with the typeface. After then everything works fine.Is it the standard behavior or something?Thank you.PS: Following is the source code of the test case<!DOCTYPE html> <html><head><meta charset=”UTF-8″><tit
jackerman09
ruby-on-rails ruby ajax html5 coffeescript
The following is inserted via Coffeescript (AJAX call to the server renders a .js.coffee file):$(‘#key-results’).html(“<%= render partial: ‘found_keys’, collection: @keys_with_chords, as: :key %>”)This works perfectly. The following is a link from the _found_keys partial:<h5><a data-method=’get’ data-remote=’true’ href=’/toggle_chords?key_to_show=<%= key.id %>’ id=’toggle-chord-link-<%= key.id %>’ rel=’nofollow’>Show Chords</a></h5>I would like to use a
tironci
php html mysql html5
I have a php project and I am trying to move it from fedora to windows. I moved the files and I can get to them and I can get to the database as well but I get a strange error SCREAM: Error suppression ignored for( ! ) Parse error: syntax error, unexpected end of file in C:\wamp\www\portfolio\templates\sell_form.php on line 21 Call Stack # Time Memory Function Location 1 0.0029 259504 {main}( ) ..\sell.php:0 2 0.1515 304656 render( ) ..\sell.php:67this the file <table cla
BoltClock
html5 css3 internet-explorer-8
Here is the code for my menu. The problem is that in Mozilla and Chrome .. everything is perfect. But IE8 doesn’t view my menu as i want. I set padding but it acts as if there i no padding. That is when mouseover the red backround is really only let’s say line.. and it should be like a box!<div class=”section” id=”navbar”><div class=”nav”><ul><li><a href=””>Home</a></li><li><a href=””>About</a></li><li><a href=””>Resso
Munzilla
javascript ajax html5 websocket accessibility
One of the major requirements for accessibility standards such as WCAG is that the web site or application displays without the use of javascript or provides some sort of non JS alternative. I did some initial research and couldn’t find much information on this in regard to websockets. Should I assume websockets are treated similar to AJAX?
Hidalgo
css html5 css3
I need to show (within a div tag) a label and right next to the label an input. I am using bootstrap css and my code is as follows:<div class=”row”><div class=”span3″><div class=”control-group”><label class=”control-label” for=”txtInput”>Enter Text:</label><div class=”controls”><input id=”txtId” class=”input-medium” name=”txtInput” /></div></div></div> </div>No matter what I do there is a space between the label (“Enter Text:”) an
JaPerk14
javascript html5 client-side
I’m programming in JavaScript and I would like to know if there is a ‘best’ method of creating multiple image objects. Take the code below as an example.var a = new Image(); var b = new Image(); var c = new Image();Is this the only way to do it, or should I do something like…var a = new Image(), b = a, c = a;I’m just wondering if there is a different way of doing the first method. I find my program contains a lot more ‘new Image()’ variables, and I thought being repetitive was bad for the co
Dennis Kipper
php mysql json kineticjs
I hope you will understand what my problem is…I built a little T-Shirt-Shop with KineticJS.I store the stage with toJSON() in a json-string and I save that in mySQL database.Now when I try to get that string with an other page from my database and insert that string into the KineticJS functionvar stage = Kinetic.Node.create(json, ‘container’);it doesn’t work.The curious thing is that when I look into my database and I copy the whole string directly into my javascript it does work. Just the fac
Becky Franklin
jquery-mobile mobile html5-canvas kineticjs
I’m having some big problems with HTML5 canvas as my app draws a LOT of shapes on several layers (using KineticJS) and then I need to clear the canvas/all layers in order to redraw a load of different shapes.This is fine in the brower on a desktop, however mobile browsers crash after a few iterations of clearing/redrawing the canvas I’m assuming due to the canvas load. At the moment I’m removing each layer from the stage and creating new ones to clear/redraw, but maybe clearing every shape of ea
skripted
javascript kineticjs
Straight forward: How do I change the position of Kinetic.Group children in the array? It is really important for me that I can alter the array and the position of each children.I tried to add a child with Array.splice on a specific position but the library crashed. So I sticked to the native .add() function, took the child from the end of the array and spliced it on first place afterwards:mapTilesContainer.add(image); var tempChild = mapTilesContainer.children[mapTilesContainer.children.length
CsReddy
javascript ipad kineticjs
I am using kinetics API for creating images,i pad browser is crashing on loading some images i think the problem with the image objects,did any one face this problem before? please help.
RooWM
touch kineticjs touchstart
I am having trouble being able to debug this issue: If you check out this jfiddle on the iPad, you’ll see you can click on each circle to change the content above. When you hold on one circle you will see it turn green (image swap).http://jsfiddle.net/SWj9m/Now, take your finger and hold on one, and then drag your finger up, or use another finger to click another ring while holding on the previous one. Now, the iPad touch event gets confused, and the green (touchstart) events stay in place rathe
robtown
kineticjs
I’ve been working for weeks on project using KineticJS, no problems. Just a few minutes ago it started throwing errors when I build and debug my page(s). This is the error: Unhandled exception at line 2258, column 13 in /scripts/kinetic-v4.0.3.js0x800a01b6 – Microsoft JScript runtime error: Object doesn’t support property or method ‘indexOf’I don’t know what’s going on, it happens on any page with KineticJS in any project…I can go open the pages up in firefox staright out the folder and evryth
someone2088
javascript html5-canvas kineticjs
I have the following function, which I’m using to load images from the hidden section in my HTML into a JavaScript array:window.onload = function(){ console.log(“src ” + document.getElementById(“building”).src);var sources = {};sources[0] = document.getElementById(“building”).src,sources[1] = document.getElementById(“chair”).src,//sources[2] = document.getElementById(“drink”).srcloadImages(sources, drawImage); };Once the images have been loaded into the JS array, I call the ‘loadImages’ function
versteckt
javascript methods kineticjs
sorry for what is probably a really dumb question but I am trying to learn how to use KineticJS and am trying to modify a tutorial (http://www.html5canvastutorials.com/labs/html5-canvas-star-spinner/) to use a static image instead of a shape. For what it’s worth, I’m trying to animate a PNG of Glenn Beck’s head to make it spin (neither here nor there really).I’ve muddled through a bunch of errors so far but I keep getting stuck with “Uncaught TypeError: Object# has no method ‘onFrame'”I’ve read
John M
javascript html5-canvas kineticjs
I have a HTML5 canvas application drawing some shapes (using KineticJS at the moment). I want to show a popup menu whenever a user hovers over a shape.The menu should look reasonably similar to an ordinary right-click popup menu, but I would prefer if it had some rich text formatting capabilities (e.g., some menu items are another color or bold), and it doesn’t have to be on the right-click (just appearing when hovering is fine).Each of the shapes can have a different number of elements in the p
Narfanator
ruby-on-rails kineticjs
So, trying to work through the KineticJS.Image tutorial, but I run into an issue.This works:$(document).ready( function() { var icon = new Image(); icon.onload = function() { var stage = new Kinetic.Stage({ container: ‘canvas’, width: 730, height: 700, });var layer = new Kinetic.Layer();var im = new Kinetic.Image({ x: -14,y: -13,image: icon,width: 30,height: 30});layer.add(im); stage.add(layer); }; icon.src = ‘#{asset_path “ic
Deukalion
xna rendering vertex shape
What is the best way to create a VertexDeclaration, that makes it able to render a Shape consisting of vertices and also be able to store a color for the shape (in case the texture can’t be rendered – or in case we want color instead of a texture) – instead of having both a VertexPositionNormalTexture and a VertexPositionColor struct in the same class/struct.I’m trying this approach:public interface IShape : IVertexType { }public struct ShapeFace {public int Count { get; set; }public Color Color
ved
java box2d libgdx shape body
need some support. I am novice in libgdx game engine. Below is my code package com.game.box2d.fruitcart;import com.badlogic.gdx.Game; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.audio.Sound; import com.badlogic.gdx.graphics.GL10; import com.badlogic.gdx.graphics.OrthographicCamera; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.m
shiami
android textview shape
I’m using shape attribute like this:<?xml version=”1.0″ encoding=”utf-8″?> <shapexmlns:android=”http://schemas.android.com/apk/res/android”android:shape=”rectangle”android:padding=”10dp”> <solidandroid:color=”#FFFFFF” /> <cornersandroid:bottomRightRadius=”15dp”android:bottomLeftRadius=”15dp”android:topLeftRadius=”15dp”android:topRightRadius=”15dp” /> </shape>and<TextViewandroid:layout_width=”wrap_content”android:layout_height=”wrap_content”android:background=”@dr
user2685747
libgdx shape circle
I’ve been searching for answer for about 2 hours now and I haven’t found my desired answer. My question is, Is it possible, and how, to draw a circle-shaped texture, so that outside the circle, texture would be transparent, is it even possible? Thanks in advance! This site has been a great help so far!
KingsInnerSoul
android xml shape
I have an xml file called border.xml in the drawable folder. In this xml I have <!– +++++++++++++++++++++ BORDER +++++++++++++++++++ –> <item> <shape android:shape=”rectangle”><solidandroid:id=”@+id/shape_border_color” android:color=”@color/black” /> <gradient android:id=”@+id/shapre_border_gradient” android:startColor=”@color/BurlyWood” android:endColor=”@color/Blue” android:angle=”270″/> <!– ++++++++++++++++++++ ROUND CORNERS ++++++++++++++++++++++++++++
nathan
android android-xml shape
I’d like to create a rectangle shape with two solid colors (horizontally) to achieve something like this:I heard about layer-list, i though i could use it to contains two rectangle with a different color but it seems that it only lays shapes vertically.Is there a way to achieve this using lalyer-list or should i use something totally different? I’d like to keep it simple with ability to change the shape colors at runtime.Thanks.
phil13131
c# wpf grid shape
I have a small problem with the visibility of an ellipse.In runtime I create an Shapes.Ellipse object and connect it to a grid with grid1.Children.Add(ellip). To control the position of the ellipse I use:ellip.HorizontalAlignment = System.Windows.HorizontalAlignment.Left; ellip.VerticalAlignment = System.Windows.VerticalAlignment.Top; ellip.Margin = new Thickness(a,b,0,0); ellip.Height = 100; ellip.Width = 100;In runtime I now keep changing the position within the grid (by changing a and b) but
H.B.
c# .net wpf shape
It won’t change the position, the position is fixed at runtime even though i change the value 50 below:System.Windows.Shapes.Rectangle myRectangle = new System.Windows.Shapes.Rectangle();mainGrid.Children.Add(myRectangle);Canvas.SetLeft(myRectangle, 50); Canvas.SetTop(myRectangle, 50);myRectangle.Height = 100; myRectangle.Width = 100;myRectangle.Stroke = System.Windows.Media.Brushes.LightSteelBlue;
inazaruk
android button imagebutton shape
I’m trying to design a button for an android application like this:The length of the button will be determined based on the size of the text. The text will change during runtime depending on the page the button is displayed on. Does anyone have an idea on how I can achieve this?
Andy
actionscript-3 sprite shape fxg
I can import FXG files as Sprites as follows:import graphics.mypic; // graphics/mypic.fxg var mysprite:Sprite = new mypic();I don’t always need the fancy things that come with Sprites. How can I import them to Shapes?
Web site is in building