transform

Javascript, css: change transform origin to centerpoint of gesturechange

守給你的承諾、 提交于 2019-12-13 14:22:43
问题 I would like to change the transform origin to the center point of the pinch gesture. This working code (safariDevSample) applies scale and rotation without changing the transform-origin : window.angle = 0; //global to store data for later reset .... var newAngle; window.scale = 1; var newScale; function saveChanges() { window.angle = newAngle; window.scale = newScale; } function getAngleAndScale(e) { // Don't zoom or rotate the whole screen e.preventDefault(); newAngle = window.angle + e

how to get a boundingbox for multiple items in wpf?

南笙酒味 提交于 2019-12-13 13:18:39
问题 I have several items, i want to calculate a minimum rectangle in which they can be fit, but items are rotated to some degree, or skewed or both. So how do i get the least rectangle which can contain all ? 回答1: You can get the bounding Box for each item, calculate its four extreme points, then apply the transforms on them (skew, rotate, ...) Then you can easily calculate the bounding box by computing the min and max x and y for all of these points. 回答2: Here is an link to an implementation of

How do you debug an xml object that causes a transform error when writing to string?

瘦欲@ 提交于 2019-12-13 12:03:15
问题 I have an XML Object and when I transform it to string with public static String XMLElementToString(Document doc, Element e) { // --- Output XML --- try { TransformerFactory transFactory = TransformerFactory.newInstance(); Transformer transformer = transFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); StringWriter buffer = new StringWriter(); Result result = new StreamResult(buffer); Source source =

How to apply XSLT transformations to XML file and produce another XML?

雨燕双飞 提交于 2019-12-13 09:46:48
问题 Input.xml <?xml version="1.0" encoding="ISO-8859-1"?> <output> <orders> <order> <id>1</id> <number>10002</number> <type>Loading</type> <date>2013-01-01T02:30:00</date> </order> <order> <id>2</id> <number>10003</number> <type>Loading</type> <date>2013-01-01T010:30:00</date> </order> </orders> <quantities> <quantity> <id_order>1</id_order> <unit>KG</unit> <value>1000</value> </quantity> <quantity> <id_order>2</id_order> <unit>PAL</unit> <value>3</value> </quantity> </quantities> </output>

How to get new position after transform div jquery?

[亡魂溺海] 提交于 2019-12-13 09:46:31
问题 How to get new position after transform? Can anybody please help me to do that. I used $('#text').css('-moz-transform','rotate(90deg)'); Now I want to get left and right postion. When I try to get left and top position it shows left and top position before transform $('#text').position().left; $('#text').position().top; It shows position before div transform I want to get the new position. How do i do that? 回答1: I am trying to solve this issue as well. What the user is saying is this: Let's

Using transform scale causes blurry text only on Windows Chrome

半世苍凉 提交于 2019-12-13 08:42:42
问题 I have run into a pretty frustrating problem regarding the CSS transform scale . I have a block of text which I would like to zoom by 105% on hover and it is causing blurriness of the text, but only on the Windows version of Chrome. I found this question and tried the various solutions provided there, but I still cannot get it to work as desired. body, html { font-family:'Open Sans', sans-serif; } .zoom { transition:transform .5s; width:300px; margin:50px auto; } .zoom:hover { transform:

Transform and Pivot in Ms-Access

荒凉一梦 提交于 2019-12-13 08:29:26
问题 I have a table looks like: Field1 Field2 Blank Fail Pass Date a 1 0 20 40 170101 a 2 1 19 99 170101 b 1 0 54 24 170101 c 3 1 24 30 170101 a 1 0 11 19 170102 b 2 0 21 266 170102 a 1 2 10 40 170103 .... The user then chooses the date range they want to display and I want my result to look like: Field1 Field2 0101_B 0101_F 0101_P 0102_B 0102_F 0102_P 0103_B 0103_F 0103_P a 1 0 20 40 0 11 19 2 10 40 a 2 1 19 99 b 1 0 54 24 c 3 1 24 30 b 2 0 21 266 Any help really appreciated! 回答1: Options: a

SVG translate transform in javascript not working in IE 11

我与影子孤独终老i 提交于 2019-12-13 07:21:24
问题 The following code doesn't work in IE 11 (Chrome works fine) <html> <head> <script> window.onload = function() {document.getElementById("abc").style.transform = "translate(100px,100px)";}; </script> </head> <body> <div> <svg width="200" height="200"> <g id="abc"> <polygon points="14,7 0,14 0,0"></polygon> </g> </svg> </div> </body> 回答1: For IE you need to set transform as an attribute rather than as a CSS style. Note that for an attribute, units are not allowed. <html> <head> <script> window

SVG gaps when using rotate transform

痞子三分冷 提交于 2019-12-13 07:14:24
问题 I'm getting this weird problem which I haven't been able to solve. I'm trying to write a rectangle react component where a Box-Gradient is an option. But my four triangles have a gap between them, I've tried hacking about with it (including using a gaussian blur) to close the gap but I can't seem to close the gap without causing the corners to mess up. <html style="margin:0;padding:0;height:100%;width:100%;"> <head> </head> <body style="margin:0;padding:0;height:100%;width:100%;"> <svg height

Flip coords for ggplot2 boxplot

心已入冬 提交于 2019-12-13 06:45:58
问题 I would like to flip the coords for a ggplot2 boxplot where I also do a coordinate transformation. library(ggplot2) dat = data.frame(group = factor(c(rep(1,3),rep(2,6))), vals = c(c(0.1,2.25,1000), c(0.11,0.21,0.21,4.55,5.06,29.48))) ggplot(dat,aes(group,vals)) + geom_boxplot() ggplot(dat,aes(group,vals)) + geom_boxplot() + coord_trans(y="log10") If I just add now "+ coord_flip()", the log scaling of the axis is lost.. ggplot(dat,aes(group,vals)) + geom_boxplot() + coord_trans(y="log10") +