transition

TransitionDrawable doesn't account for padding?

孤街浪徒 提交于 2019-12-10 23:54:43
问题 I tried the accepted solution posted here, but it appears to ignore padding. When the second view (in this case a button) displays, it's much smaller than the original which has padding. Is there a workaround for that? Thanks 回答1: Yes, TransitionDrawable extends from LayerDrawable which ignores the padding. This is the getPadding() method in the base Android code, which gets rid of anything you specified: @Override public boolean getPadding(Rect padding) { // Arbitrarily get the padding from

D3 Multiline Chart with Tooltip Transition Issue

。_饼干妹妹 提交于 2019-12-10 21:12:10
问题 I have been using d3 to create a multiline chart with focus and context brushing. Everything is going well except on the transition the dots at the data points with the tooltips are moving to a completely wrong position. I can't figure out what is causing this. Any help would be much appreciated. I attached the full code here and noted on the graph where I'm pretty sure the bug should be: http://jsbin.com/osumaq/20/edit When the button is clicked, a new json is passed to the graph to read.

D3: text transitioning in typewriter style

拜拜、爱过 提交于 2019-12-10 19:53:15
问题 In this jsfiddle, label transitions from one text to another by decreasing font of old text, and in turn increasing the font of new text. However, I would like new text to apperar in "typewriter" fashion, like in this jsfiddle. How to write a custom D3 text interpolator that will enable text transitioning in this "typewriter" way? 回答1: Interesting ideas, both get the job done, but there's a d3-specific way to do this: a custom tween function. Fiddle here: http://jsfiddle.net/QbysN/3/ Code:

e.stopPropagation not working

十年热恋 提交于 2019-12-10 19:11:42
问题 I added a transtionend callback event to an element. This element has a child that has a transition as well. The problem is that, when the child's transition ends, its' parent transitionend event gets called. I tried adding e.stopPropagation() to the transitionend event, but it didn't help. It didn't seem like it did anything. How can I prevent the transitionend event happening when the child finishes its transition? JSFiddle var outer = document.getElementById('outer'), content = document

angular 6 animation *ngIf, transition not work

拟墨画扇 提交于 2019-12-10 15:35:27
问题 The project presents two variants of animation. Animation Option 1, trigger('animationOption1') Works without complaints. Animation Option 2, trigger('animationOption2') transition doesn't work here. Online check this project in StackBlitz.com app.component.html <h1>Animation Option 1</h1> <div (click)="changeDivState()" [@animationOption1]="clickedDivState" >Click Me </div> <h1>Animation Option 2</h1> <button (click)="toggleMenu()">Click Me</button> <ul *ngIf="isMenuOpen" [@animationOption2]

d3 translate rotate order in transition

佐手、 提交于 2019-12-10 15:27:22
问题 I'm trying to play with d3 transitions - I need to do both translate and rotate. I have original coordinates: let data = [ {x: 100, y: 100, rotation: 45}, ]; and 2 rectangles. One is doing translate first, second one is doing rotation first. This is resulting transform after drawing rectangles: transform="rotate(45 115 105) translate(100, 100)" transform="translate(100, 100) rotate(45 115 105)" they have the same translate and rotate transformations, only thing which differs is order of them.

Why the transitionend event can be run when element's children's transition is ended?

风流意气都作罢 提交于 2019-12-10 15:11:26
问题 I bound a transitionend event to div1 . When div1 's transition was end, the event ran. There's no problem. I encountered a special case: I added 3 paragraphs to this div1 , when each paragraph's transition is ended, div1 's transitionend event also ran. So the transitionend event ran 4 times. >.< In div1 's transitionend event's listener function's body, I can see that event.target !== this . I feel it's pretty ridiculous! Chrome and Firefox both has this problem. So I guess this is not a

using jquery to transition between images

梦想的初衷 提交于 2019-12-10 14:55:15
问题 I have two images that are of same size and text but different colors (they are used as logos). I would like to slowly automatically transition between the two images using jQuery. First, I was going to make a GIF image out of the two images but then thought that perhaps jQuery can be used. Is this possible with jQuery? I want the transition to happen without any input from the user and it can happen every X seconds. Please let me know how this can be done. 回答1: I think this would definitely

How to implement interactive transitions in a custom container view controller

僤鯓⒐⒋嵵緔 提交于 2019-12-10 14:48:32
问题 I implemented my own custom container view controller and I try to make it compatible with iOS 7 view controller transitions. I make my custom container view controller conform to UIViewControllerContextTransitioning and I send self when I call transitionDuration: and animateTransition: . It all works fine as long as I use only animated transitions. Now I want to make it work with interactive transitions, so I call the interaction controller's startInteractiveTransition: instead of the

Moving an image from A to B with JavaScript

。_饼干妹妹 提交于 2019-12-10 14:05:23
问题 Its my first time here and I don't know how to indent this sorry :/ I have an image of a van and I am trying to move it across the screen to as if it is driving. Once that is done I will scale the image to appear as if it is moving away (and getting smaller). I need this to be done in standard javascript without any packages (such as JQuery) please. What I've got is a van which for a reason I can't break down is moving along 2 paths instead of one. Also moving in the wrong direction (it