How does price-elasticity of supply affect the incidence of tax on consumer and producer
You are right: both the price-elasticity of demand and the price-elasticity of supply affect the respective proportions for producers and consumers of the burden of a per unit tax imposed on sales by producers.  

The proportions depend on the relative slopes, which reflect price-elasticities, of the demand and supply curves. Considering the elastic supply case in your diagram, the slope of the demand curve between points AE is much steeper than that of the supply curve between CE.  Hence E is much closer, in the vertical (price) dimension, to C than to A. Thus the post-tax price to consumers (p2 corresponding to A) is much further from the pre-tax price (p1 corresponding to E) than is the post-tax price to producers (p3 corresponding to C),and so most of the burden falls on consumers.  For the inelastic supply case the position is reversed.  A detailed explanation may be found in this NTRC paper (see section III).